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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: af933d56ed2a8a49c9b05dfee64b5a8e7a13d84358c54966208507f1703090ec
4
- data.tar.gz: dd28e88602d3c2d9f4b908d79260b2849d34cbdd3c8b6c204a18c96c2ad2d217
3
+ metadata.gz: 90e5bf3fd1991d755505ba17c9ec917279bed6ed92e8b336005ccbcf4568ac01
4
+ data.tar.gz: 84a1301995e457d5ac7250528ca7dafb6ac3d043d41c8dec65a200f452217c11
5
5
  SHA512:
6
- metadata.gz: a46d1580c41d7597766cea58782d0e7c4092aca90210049b5155d9b0330c3b5ed01cb8f24d8ab299bc12fcdec13a3b9f79fb8e4959e4cb3b38af1a1d407164a2
7
- data.tar.gz: a422ebe046792b4f000918c86a0df61e9884f276dbb5d580cce8ac02fb090186552cc25ae3da26682775460ef84a9da7a7296e2260e9e02c1a5ccec7d5960e0f
6
+ metadata.gz: 481fd4b475b39f2c048288831ae0929b86062dbb63edb49ada6b4652a7c33953a172bb9f3ec5f2c4d9cf2d1653bf3a6625b692d8d776ae6b11281ca30bc57b73
7
+ data.tar.gz: eab64d1fa9fb21caa68e028943ea22bd4ced563a7ca9fb08d35e23dd5ae325c00918a1485273297ef46311c047eef4790631d60022a9eea5eed1bc4504d74bdd
@@ -305,12 +305,7 @@ module Effective
305
305
  end
306
306
  )
307
307
 
308
- if joined
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
- joined ? relation.where("#{sql_column} = ?", term) : relation.where(attribute.eq(term))
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}%"))
@@ -1,3 +1,3 @@
1
1
  module EffectiveResources
2
- VERSION = '2.2.4'.freeze
2
+ VERSION = '2.2.5'.freeze
3
3
  end
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
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-09 00:00:00.000000000 Z
11
+ date: 2023-01-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails