effective_datatables 4.17.1 → 4.17.2

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: 2be4e45193ceaf2f5fc2f8543cde183156ec0210d844a9603977f7b456197bf4
4
- data.tar.gz: c7b437a89b3439f79b1d596936efb1be6401d8c12a4ffb844aecf2150d59772d
3
+ metadata.gz: ad7b621e95979cb0e0e41548ef4993a0efd1ca7f1d262656c4a04e611f99fe3d
4
+ data.tar.gz: 657a4d88aab6e8eff27c86611bff1f35862b69fa30422fe2e29eb3ad0ecb7159
5
5
  SHA512:
6
- metadata.gz: d8601ecaaea61c41cdb6375e0f6b6521593326596c620142a7ea5752030dc3b9957453c1c1c3b82d6de54e21d8811fb6bad64cebef629cc6f6d064d86d8aec29
7
- data.tar.gz: 0f55d6478da0bb096d493c898dc34a606b85f7b8b4009ff35bc5a58e5bc0a34c7828fe67b81fe4b4daa69f5b9f672d85e1d14787211bc6f4cf485e921d160884
6
+ metadata.gz: 033e9e91e76c4682a5dd7bcc02cb68ae4e17558bfe22f665f476ed970b2c75790b9a87e3982b74a254777b9edc6fdfa80e51e88f082c770c76511cbbeecf7800
7
+ data.tar.gz: 5e3c4745edf257887fa236e0d974985a235599884ce912088140290afcdadcd13cd9ed9846d7bf2f758b4de0546b3d51c885b8aeeeeed90295de2f02ce7cfb3f
@@ -178,6 +178,8 @@ module Effective
178
178
  search[:collection] = search[:collection].map { |obj| [obj.to_s, obj.id] }
179
179
  elsif search[:collection].kind_of?(Array) && search[:collection].first.kind_of?(ActiveRecord::Base)
180
180
  search[:collection] = search[:collection].map { |obj| [obj.to_s, obj.id] }
181
+ elsif search[:collection].kind_of?(Array)
182
+ search[:collection] = search[:collection]
181
183
  end
182
184
 
183
185
  search[:as] ||= :select if search.key?(:collection)
@@ -189,6 +191,8 @@ module Effective
189
191
 
190
192
  if array_collection? && opts[:resource].present?
191
193
  search.reverse_merge!(search_resource.search_form_field(name, collection.first[opts[:index]]))
194
+ elsif search[:as] == :select && search[:collection].kind_of?(Array)
195
+ # Nothing to do
192
196
  elsif search[:as] != :string
193
197
  search.reverse_merge!(search_resource.search_form_field(name, opts[:as]))
194
198
  end
@@ -1,3 +1,3 @@
1
1
  module EffectiveDatatables
2
- VERSION = '4.17.1'.freeze
2
+ VERSION = '4.17.2'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: effective_datatables
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.17.1
4
+ version: 4.17.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Code and Effect
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-04-03 00:00:00.000000000 Z
11
+ date: 2023-05-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails