effective_datatables 4.7.10 → 4.7.11

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: d7466c3941269d0062b5b2f920ae7371343f341bc8f09c8672d3a57217a80d57
4
- data.tar.gz: 3338eb6cdc80824533d228d14aa9414ff19b3947b849ba466b348a5448ba6c18
3
+ metadata.gz: c6dde337dfa9e074daef78e5f07f6e3b5d6eb42ff831475096a05f9e1c0f7a9a
4
+ data.tar.gz: 66ce7aa33b616d233532802f15ea68253b79b1919bd2e3fec5113d0891aef3fd
5
5
  SHA512:
6
- metadata.gz: 5e4ef7ef9d01e2f192dfe051c09fbbe1f9fdc4fd2979ca3cfd2b86ab8bc6a5fb31708e8e1531c882db9fc3b08cdd60580440e25613f0bf6ebc41d98f29cfac29
7
- data.tar.gz: e6a9170763f485ad3cddc04d5502b7fca657c28aa9cd04c509c91975e68b9139489f8b2e1bc0ac10ed707b621286330aab06f82c1fce1221d121b7b4241ae152
6
+ metadata.gz: 2d1597c28e8e327c7fa906291c9c830719329ba9e7f58e4778002a7388c5ca5dbb11be5c2edd23c144ff1b2ce7bc7189c8ac29165f542fd165f88037ddf757ce
7
+ data.tar.gz: 1e144fb45d2a573cc1f3def41dcc5ed9452374ffae777a6d22e39805149180cf5fec0eea4bf377509e53a85a76c6a1597fdf3dbb7b37947961e980a9ceba4272
@@ -164,6 +164,13 @@ module Effective
164
164
 
165
165
  search = opts[:search]
166
166
 
167
+ # Parameterize collection
168
+ if search[:collection].kind_of?(ActiveRecord::Relation)
169
+ search[:collection] = search[:collection].map { |obj| [obj.to_s, obj.to_param] }
170
+ elsif search[:collection].kind_of?(Array) && search[:collection].first.kind_of?(ActiveRecord::Base)
171
+ search[:collection] = search[:collection].map { |obj| [obj.to_s, obj.to_param] }
172
+ end
173
+
167
174
  search[:as] ||= :select if search.key?(:collection)
168
175
  search[:fuzzy] ||= true unless search.key?(:fuzzy)
169
176
  search[:value] ||= search.delete(:selected) if search.key?(:selected)
@@ -1,3 +1,3 @@
1
1
  module EffectiveDatatables
2
- VERSION = '4.7.10'.freeze
2
+ VERSION = '4.7.11'.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.7.10
4
+ version: 4.7.11
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: 2019-07-10 00:00:00.000000000 Z
11
+ date: 2019-07-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails