effective_resources 2.2.3 → 2.2.4

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: 1d4c8949c461fb0b18d3678caf9a4042f365075ee62dcaccc2fdb8959e9a9f88
4
- data.tar.gz: 37fac9155c56b4f08329b7c1aa3ace75732837c2a992057bf6a9cb309ea6b16c
3
+ metadata.gz: af933d56ed2a8a49c9b05dfee64b5a8e7a13d84358c54966208507f1703090ec
4
+ data.tar.gz: dd28e88602d3c2d9f4b908d79260b2849d34cbdd3c8b6c204a18c96c2ad2d217
5
5
  SHA512:
6
- metadata.gz: 6f1d0ebbf97e9833f1a5d22a37da11f91eaf86f57a1f3091793373b81d32b352bee94e641816e2efccdbea569ded82db913743e18288ba2eeb40efefe3dc24e5
7
- data.tar.gz: d6199a46442c28b8d6c808e80933954d79cb3d7f584a603dd748329b47d58ffa327872e7f102c9a5dbcef4a352d3cec6055e175206b98628dd794e1b34a06328
6
+ metadata.gz: a46d1580c41d7597766cea58782d0e7c4092aca90210049b5155d9b0330c3b5ed01cb8f24d8ab299bc12fcdec13a3b9f79fb8e4959e4cb3b38af1a1d407164a2
7
+ data.tar.gz: a422ebe046792b4f000918c86a0df61e9884f276dbb5d580cce8ac02fb090186552cc25ae3da26682775460ef84a9da7a7296e2260e9e02c1a5ccec7d5960e0f
@@ -284,7 +284,7 @@ module Effective
284
284
  term = Attribute.new(as).parse(value, name: name) || value
285
285
 
286
286
  # If using the joined syntax from datatables
287
- joined = sql_column.to_s.include?('.')
287
+ joined = (sql_column.to_s.split('.').first.to_s.include?(relation.arel_table.name) == false)
288
288
 
289
289
  searched = case as
290
290
  when :active_storage
@@ -338,7 +338,7 @@ module Effective
338
338
  when :eq then
339
339
  joined ? relation.where("#{sql_column} = ?", term) : relation.where(attribute.eq(term))
340
340
  when :matches then
341
- joined ? relation.where("#{sql_column} #{ilike} ?", "%#{term}%") : relation.where(attribute.eq(term))
341
+ joined ? relation.where("#{sql_column} #{ilike} ?", "%#{term}%") : relation.where(attribute.matches("%#{term}%"))
342
342
  when :not_eq then relation.where(attribute.not_eq(term))
343
343
  when :does_not_match then relation.where(attribute.does_not_match("%#{term}%"))
344
344
  when :starts_with then relation.where(attribute.matches("#{term}%"))
@@ -1,3 +1,3 @@
1
1
  module EffectiveResources
2
- VERSION = '2.2.3'.freeze
2
+ VERSION = '2.2.4'.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.2.3
4
+ version: 2.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Code and Effect