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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 79efead0c84ab92c84d1debc7550270ad2022cb7db295a6b6f520a941e664c4e
4
- data.tar.gz: a05ebbedad3a89ef8e0d809b1d88a6c91e8e8664a5df09cfa793ca1c50e5b03f
3
+ metadata.gz: 90f1689a79fcae340f7c4d4634c1ca354ebc792862e67dc4861df0abc04e1bb0
4
+ data.tar.gz: 66701f4aafd545d5ccf415fb979e6eb5658e55eee30388a0e5da2dd629a98641
5
5
  SHA512:
6
- metadata.gz: 2c68736cdf36dd81d9e7808f3b2a1be45a2da28707e7a74759deb15004823e918abdd38fbd6f9269b2aa646f9f824cc9b05c74dd896af898f794faabc03ac614
7
- data.tar.gz: b0c09cabf949739e4d2ba5e91b61c3c03e7c493be82614118145b743e284286985e0da0f1c7e1c0985c5b2a81927c72addc82612bbccb43a65a5fc5343f1f140
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
- klass.arel_table[column_name].in(value.flatten.compact.uniq)
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
- klass.arel_table[column_name].in_all(value.flatten.compact.uniq)
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
- klass.arel_table[column_name].in_any(value.flatten.compact.uniq)
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module FetcheableOnApi
4
- VERSION = '0.3'.freeze
4
+ VERSION = '0.3.1'.freeze
5
5
  end
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: '0.3'
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-15 00:00:00.000000000 Z
11
+ date: 2019-05-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport