fetcheable_on_api 0.3 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/fetcheable_on_api/filterable.rb +15 -3
- data/lib/fetcheable_on_api/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: 90f1689a79fcae340f7c4d4634c1ca354ebc792862e67dc4861df0abc04e1bb0
|
4
|
+
data.tar.gz: 66701f4aafd545d5ccf415fb979e6eb5658e55eee30388a0e5da2dd629a98641
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6450d722cf306defbf4f22e8165c641f0ff451dc91b8c480a1eb27171fed0c63847d7ef19b8b02fdf6a1aea14395a7e0a5b21513c313203ad2b7de30709a49f0
|
7
|
+
data.tar.gz: 435225bbe049a472e4dc9d23581221e5cfe936e70c098e99a459f9e1060cb2c315f073b7859f429da55e5cc68e7fa8611ebcf520091e1264d78b540467cf1688
|
@@ -167,11 +167,23 @@ module FetcheableOnApi
|
|
167
167
|
when :gteq_any
|
168
168
|
klass.arel_table[column_name].gteq_any(value)
|
169
169
|
when :in
|
170
|
-
|
170
|
+
if value.is_a?(Array)
|
171
|
+
klass.arel_table[column_name].in(value.flatten.compact.uniq)
|
172
|
+
else
|
173
|
+
klass.arel_table[column_name].in(value)
|
174
|
+
end
|
171
175
|
when :in_all
|
172
|
-
|
176
|
+
if value.is_a?(Array)
|
177
|
+
klass.arel_table[column_name].in_all(value.flatten.compact.uniq)
|
178
|
+
else
|
179
|
+
klass.arel_table[column_name].in_all(value)
|
180
|
+
end
|
173
181
|
when :in_any
|
174
|
-
|
182
|
+
if value.is_a?(Array)
|
183
|
+
klass.arel_table[column_name].in_any(value.flatten.compact.uniq)
|
184
|
+
else
|
185
|
+
klass.arel_table[column_name].in_any(value)
|
186
|
+
end
|
175
187
|
when :lt
|
176
188
|
klass.arel_table[column_name].lt(value)
|
177
189
|
when :lt_all
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fetcheable_on_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Fabien
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-05-
|
11
|
+
date: 2019-05-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|