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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5e348fb91874d5f0cbc26e66ca5b72350f1dd3ee7526a77cbb8b4b68210eac61
4
- data.tar.gz: b8a26a5cb4153306f16d2bcdf418d54aeb2dcc3b1c35c8424c8782f0a38e4110
3
+ metadata.gz: d09c8f004df1def2c6a2cebc8fd78ce3335138ccd5934b7803cc740663b94a84
4
+ data.tar.gz: 45e2a292a727c4a810b959cc0880dff2d0a2ce150ae7afba7fcfed5715322c65
5
5
  SHA512:
6
- metadata.gz: 6e85c5cf8dba9f643b3cd9a14987c44d28f65b1793c6a81dce5596c66fec1903a4972bd3967610ef39782ea22c62d080f49efce92430f37cfbae77281dbbddda
7
- data.tar.gz: eec4d7fe863db7d2001bddae2c8afa51f0d144a432e54ccca37f697d922ecb375ae92c3f166c877ff761dd0c05a48419a17e85c4a2bb6653fa27fdd7ce4db0e8
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
- { collection: res.klass.datatables_filter.map { |obj| [obj.to_s, obj.id] } }
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
@@ -1,3 +1,3 @@
1
1
  module EffectiveResources
2
- VERSION = '2.7.14'.freeze
2
+ VERSION = '2.7.15'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: effective_resources
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.7.14
4
+ version: 2.7.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - Code and Effect