effective_resources 2.2.4 → 2.2.5
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/relation.rb +5 -10
- data/lib/effective_resources/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 90e5bf3fd1991d755505ba17c9ec917279bed6ed92e8b336005ccbcf4568ac01
|
4
|
+
data.tar.gz: 84a1301995e457d5ac7250528ca7dafb6ac3d043d41c8dec65a200f452217c11
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 481fd4b475b39f2c048288831ae0929b86062dbb63edb49ada6b4652a7c33953a172bb9f3ec5f2c4d9cf2d1653bf3a6625b692d8d776ae6b11281ca30bc57b73
|
7
|
+
data.tar.gz: eab64d1fa9fb21caa68e028943ea22bd4ced563a7ca9fb08d35e23dd5ae325c00918a1485273297ef46311c047eef4790631d60022a9eea5eed1bc4504d74bdd
|
@@ -305,12 +305,7 @@ module Effective
|
|
305
305
|
end
|
306
306
|
)
|
307
307
|
|
308
|
-
|
309
|
-
relation.where("#{sql_column} >= ? AND #{sql_column} <= ?", term, end_at)
|
310
|
-
else
|
311
|
-
relation.where(attribute.gteq(term)).where(attribute.lteq(end_at))
|
312
|
-
end
|
313
|
-
|
308
|
+
relation.where("#{sql_column} >= ? AND #{sql_column} <= ?", term, end_at)
|
314
309
|
end
|
315
310
|
|
316
311
|
when :effective_obfuscation
|
@@ -334,11 +329,11 @@ module Effective
|
|
334
329
|
return searched if searched
|
335
330
|
|
336
331
|
# Simple operation search
|
332
|
+
# The Arel operator eq and matches bug out with serialized Array columns. So we avoid for datatables usage.
|
333
|
+
|
337
334
|
case operation
|
338
|
-
when :eq then
|
339
|
-
|
340
|
-
when :matches then
|
341
|
-
joined ? relation.where("#{sql_column} #{ilike} ?", "%#{term}%") : relation.where(attribute.matches("%#{term}%"))
|
335
|
+
when :eq then relation.where("#{sql_column} = ?", term)
|
336
|
+
when :matches then relation.where("#{sql_column} #{ilike} ?", "%#{term}%")
|
342
337
|
when :not_eq then relation.where(attribute.not_eq(term))
|
343
338
|
when :does_not_match then relation.where(attribute.does_not_match("%#{term}%"))
|
344
339
|
when :starts_with then relation.where(attribute.matches("#{term}%"))
|
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.2.
|
4
|
+
version: 2.2.5
|
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-01-
|
11
|
+
date: 2023-01-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|