slash_admin 1.5.5 → 1.5.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e05ff7dc688e9ce000ccc9b495ef50d15f426c793cc269e12a694f37cb3ee703
4
- data.tar.gz: 97854cf7acee2e53de6edbc6aea3515d738c74d87073d83668b2a529cf221b88
3
+ metadata.gz: 75a4d10e9ae3f3459f4f84a212d4cd959af543dfe9313daa264b860f057f93ad
4
+ data.tar.gz: 220d6763eea19e9eea0b556b092305d7e27b1cc25d075612df92888383f225e7
5
5
  SHA512:
6
- metadata.gz: 5ccb114e9576d12d79fcf1e5ccbc35813046aec881098dc8aa796960715a37a4e0c3d1bc583c733484661ccc2f4650d1b6c0f94a42a8be06e1edcd3c62ebbe69
7
- data.tar.gz: ddadcfcc2fae1e85525e34a338c6a93e4a169517ff4d5b9e0e6f76f5acf8d387d6a3f67a41681d1a8f944ffde55937f0322783330f8aea49b90fa8a74933b6a0
6
+ metadata.gz: 68e65e9c493da98d401df31ff689bb752d67d2d4343083473b988ae5a228dbc03969778807e3199de72eb5f5d23c55f8934771020a447b18bc33feafdd424524
7
+ data.tar.gz: 93556b4c7d5e7078698f1cf30cab0ed0ac8900a5f6bf0d83570244c1c45eebcc814bbeacc5e79473416096018b137ebe63c037682f1ab69b847c9fc9a6a49894
@@ -1,7 +1,7 @@
1
1
  <%= f.label a, class: "form-control-label #{required?(f.object, a).present? ? 'required' : ''}" %>
2
2
  <%= render 'slash_admin/shared/tooltip', a: a %>
3
3
  <%= f.collection_select a.to_s + '_id',
4
- class_name_from_association(f.object, a).constantize.all.order(f.object.send(a).present? ? "CASE WHEN id = #{f.object.send(a).try(:id)} THEN 1 ELSE 0 END DESC" : "id DESC").limit(20), :id, object_label(class_name_from_association(f.object, a)),
4
+ class_name_from_association(f.object, a).constantize.all.order(f.object.send(a).present? ? Arel.sql("CASE WHEN id = #{f.object.send(a).try(:id)} THEN 1 ELSE 0 END DESC") : "id DESC" ).limit(20), :id, object_label(class_name_from_association(f.object, a)),
5
5
  {
6
6
  include_blank: true,
7
7
  },
@@ -1,7 +1,7 @@
1
1
  <%= f.label a, class: "form-control-label #{required?(f.object, a) ? 'required' : ''}" %>
2
2
  <%= render 'slash_admin/shared/tooltip', a: a %>
3
3
  <%= f.collection_select "#{a.to_s.singularize}_ids",
4
- class_name_from_association(f.object, a).constantize.all.order(f.object.send(a).present? ? "CASE WHEN id IN(#{f.object.send(a).pluck(:id).join(',')}) THEN 1 ELSE 0 END DESC" : "id DESC").limit(20), :id,
4
+ class_name_from_association(f.object, a).constantize.all.order(f.object.send(a).present? ? Arel.sql("CASE WHEN id IN(#{f.object.send(a).pluck(:id).join(',')}) THEN 1 ELSE 0 END DESC") : "id DESC").limit(20), :id,
5
5
  object_label(class_name_from_association(f.object, a)),
6
6
  {include_blank: true},
7
7
  {
@@ -2,7 +2,7 @@
2
2
  <%= render 'slash_admin/shared/tooltip', a: a %>
3
3
  <% class_name_from_association = class_name_from_association(f.object, a) %>
4
4
  <%= f.collection_select a.to_s + '_id',
5
- class_name_from_association.constantize.all.order(f.object.send(a).present? ? "CASE WHEN id = #{f.object.send(a).try(:id)} THEN 1 ELSE 0 END DESC" : "id DESC").limit(20), :id, object_label(a),
5
+ class_name_from_association.constantize.all.order(f.object.send(a).present? ? Arel.sql("CASE WHEN id = #{f.object.send(a).try(:id)} THEN 1 ELSE 0 END DESC") : "id DESC").limit(20), :id, object_label(a),
6
6
  {
7
7
  include_blank: true,
8
8
  },
@@ -1,3 +1,3 @@
1
1
  module SlashAdmin
2
- VERSION = "1.5.5"
2
+ VERSION = "1.5.6"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: slash_admin
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.5
4
+ version: 1.5.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - KOVACS Nicolas
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-11-26 00:00:00.000000000 Z
11
+ date: 2021-01-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '6.0'
19
+ version: '6.1'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '6.0'
26
+ version: '6.1'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: http_accept_language
29
29
  requirement: !ruby/object:Gem::Requirement