effective_resources 2.7.13 → 2.7.15
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: 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
|
@@ -391,6 +391,8 @@ module Effective
|
|
391
391
|
def search_columns_by_ilike_term(collection, value, columns:, fuzzy: nil)
|
392
392
|
return collection if value.blank?
|
393
393
|
|
394
|
+
value = value.to_s
|
395
|
+
|
394
396
|
raise('unsupported OR and AND syntax') if value.include?(' OR ') && value.include?(' AND ')
|
395
397
|
raise('expected columns') unless columns.present?
|
396
398
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: effective_resources
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.7.
|
4
|
+
version: 2.7.15
|
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: 2023-05-
|
11
|
+
date: 2023-05-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|