query_helper 0.2.4 → 0.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: a11328276be2040e6ba1f3d9987c67f7d7ba9c10a04f37d5b8eb06709b301558
4
- data.tar.gz: d33e4bde437e7b3242917f77083f599a8a454465f1bda8811e21af77c5103edf
3
+ metadata.gz: 9e3a9ded9b05b03a8401a63c12f0fd27eac2cc3626b8378bc403fabcc58f5081
4
+ data.tar.gz: 62955d32fc7038eac24c71b774219fb6262abae9c9902ed7b7a12541e7a7f696
5
5
  SHA512:
6
- metadata.gz: 13406b128956708c3b94207751d0cb7fab06f8f5623068f21fbe81bc6609f34c2e0b2b303738ba17d330ba738ce482b3c97370a07125c3047dbb5805fc5da039
7
- data.tar.gz: 4248b024a2fcef22ebea5045b739f7dedf6a45c4b50418fdcc0bee64fc6a83894ea5aad59ba86e1543298d614f9beb2ea901645bd462fcceea5570156c12de35
6
+ metadata.gz: 2b169439dec28f51236270c032daaadbc69ddee241a3ee8c9a98abb2a222817844db98489edeefb54134e04718e4d1780b42e1941120a6af3115298e2c01f4bb
7
+ data.tar.gz: b7ee5f5541b002e5171e9652a0b060a744f58ab56d82dd8053dfa39916265dc7996be1ec3b4bfc2158bce4265e3271439ddb6edfd6a7da7ea4264345168c8c74
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- query_helper (0.2.4)
4
+ query_helper (0.2.5)
5
5
  activerecord (~> 5.0)
6
6
  activesupport (~> 5.0)
7
7
 
@@ -81,7 +81,13 @@ class QueryHelper
81
81
 
82
82
  def modify_comparate
83
83
  # lowercase strings for comparison
84
- @comparate = "lower(#{@comparate})" if criterion.class == String && criterion.scan(/[a-zA-Z]/).any? && !["true", "false"].include?(criterion)
84
+ if (criterion.class == String &&
85
+ criterion.scan(/[a-zA-Z]/).any? &&
86
+ !["true", "false"].include?(criterion)) ||
87
+ (criterion.class == Array &&
88
+ criterion.to_s.scan(/[a-zA-Z]/).any?)
89
+ @comparate = "lower(#{@comparate})"
90
+ end
85
91
  end
86
92
 
87
93
  def validate_criterion
@@ -1,3 +1,3 @@
1
1
  class QueryHelper
2
- VERSION = "0.2.4"
2
+ VERSION = "0.2.5"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: query_helper
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.4
4
+ version: 0.2.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Evan McDaniel
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-01-29 00:00:00.000000000 Z
11
+ date: 2020-03-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler