effective_datatables 4.20.4 → 4.20.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: efe60765e3b15e6c05007e9bba964cb70d52e411ff5fe8eb7899c7289317c24d
|
4
|
+
data.tar.gz: ec684a2e94cb1955f657fe86f412302ac5ff44795e3f6f06217f22240cd27e33
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
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
|
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.
|