effective_datatables 4.20.4 → 4.20.5

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: de9e67c1d5ddd3f19c322ea61f2bb1b50f9792e1ca6666607af4a14f11dc615d
4
- data.tar.gz: ae1f07be260e375e21d4cf4520a1d55fb4c51787ea09f4f56acfc49168137f45
3
+ metadata.gz: efe60765e3b15e6c05007e9bba964cb70d52e411ff5fe8eb7899c7289317c24d
4
+ data.tar.gz: ec684a2e94cb1955f657fe86f412302ac5ff44795e3f6f06217f22240cd27e33
5
5
  SHA512:
6
- metadata.gz: 711ca1ee0f32fd3b91bcac59f294ac8d3822d364a7318ee89d68ed6a8d0de7147dab2934365abcc3e49ba1ea85142ba50f515207601e651677fc74f1cfdf5281
7
- data.tar.gz: fd4a8536658314a46199c03aec85898365b992472b78e7e8592b468a25f6cc16ed914b2385f131b0e5f927963b5990a469b0a93e8e62697ec80c151e611ca7ba
6
+ metadata.gz: bf3517b19749fa82ff16a57cee12b778b88693e2519830e438af3f18752e771ed519fadd586c72d6cd155084fc9fd358a5e3fa4939a7c9c4a023db8348957619
7
+ data.tar.gz: db6d03253ce56d049b95992f382c41c4ea7f9d44f5e1919243430ec40eb3b927f1365960641eb1ac30343ad557c1842cd9267d6ca738af12610a9c2bad90bbf6
@@ -177,7 +177,9 @@ module Effective
177
177
  search = opts[:search]
178
178
 
179
179
  # Parameterize collection
180
- if search[:collection].kind_of?(ActiveRecord::Relation)
180
+ if attributes[:searchable] == false
181
+ # Nothing to do
182
+ elsif search[:collection].kind_of?(ActiveRecord::Relation)
181
183
  search[:collection] = search[:collection].map { |obj| [obj.to_s, obj.id] }
182
184
  elsif search[:collection].kind_of?(Array) && search[:collection].first.kind_of?(ActiveRecord::Base)
183
185
  search[:collection] = search[:collection].map { |obj| [obj.to_s, obj.id] }
@@ -193,7 +195,9 @@ module Effective
193
195
  search_resource = search_resource.find { |res| res.klass.present? } || search_resource.first
194
196
 
195
197
  # Assign search collections from effective_resources
196
- if search[:as] == :string
198
+ if attributes[:searchable] == false
199
+ # Nothing to do
200
+ elsif search[:as] == :string
197
201
  # Nothing to do. We're just a string search.
198
202
  elsif search[:as] == :select && search[:collection].kind_of?(Array)
199
203
  # Nothing to do. We already loaded the custom parameterized collection above.
@@ -1,3 +1,3 @@
1
1
  module EffectiveDatatables
2
- VERSION = '4.20.4'.freeze
2
+ VERSION = '4.20.5'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: effective_datatables
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.20.4
4
+ version: 4.20.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Code and Effect