effective_resources 2.7.14 → 2.7.15
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/models/effective/resources/forms.rb +8 -1
- data/lib/effective_resources/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d09c8f004df1def2c6a2cebc8fd78ce3335138ccd5934b7803cc740663b94a84
|
4
|
+
data.tar.gz: 45e2a292a727c4a810b959cc0880dff2d0a2ce150ae7afba7fcfed5715322c65
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a1e4d8ce6a7651ef6a75eb3d9e5db2f46b38bd2d6d399b26ad32d5c9cb1b38751cf2e0df139d916afdc0bf067ed07c67f8d3b3c7211faa6a7e82cb2189a8d7b7
|
7
|
+
data.tar.gz: 3de7ab00c232373fc66c4254cdc49457b84c4bb32e53951ed50e94adab89f3819c8e659fd37ce88c8707b6f609877474d7c7da26cb70c8762b6ebe16c61c5abc
|
@@ -75,7 +75,14 @@ module Effective
|
|
75
75
|
if res.klass.unscoped.respond_to?(:datatables_scope)
|
76
76
|
{ collection: res.klass.datatables_scope.map { |obj| [obj.to_s, obj.id] } }
|
77
77
|
elsif res.klass.unscoped.respond_to?(:datatables_filter)
|
78
|
-
|
78
|
+
collection = res.klass.datatables_filter
|
79
|
+
|
80
|
+
if collection.kind_of?(Array)
|
81
|
+
{ collection: collection }
|
82
|
+
else
|
83
|
+
{ collection: collection.map { |obj| [obj.to_s, obj.id] } }
|
84
|
+
end
|
85
|
+
|
79
86
|
elsif res.klass.unscoped.respond_to?(:sorted)
|
80
87
|
{ collection: res.klass.sorted.map { |obj| [obj.to_s, obj.id] } }
|
81
88
|
else
|