mongoid_ability 0.3.5 → 0.3.6

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
  SHA1:
3
- metadata.gz: 7cececf7c6d06e78a0352d1d25585e9015da3435
4
- data.tar.gz: 3c2c4e2bf689af0ff65b39c9e6756aca7fba1261
3
+ metadata.gz: 4c3966d3f6bc2143789632f8075458b796341c98
4
+ data.tar.gz: 6b8f7778d4a847da6616be4441b11b90ba979bb4
5
5
  SHA512:
6
- metadata.gz: a4158f26b3ee625ecbac3eee508a8ff310cd35232d9f4af8ae6d7e15e051ca49174a12ddaa279e4bfd785163a7405449e9a14d7fb038685219153b3db2982413
7
- data.tar.gz: 11d07ad4dc0b89615ccafb366623a2e756deca09d27b5e194d0344684936906762bd39fadb1e9e35ce235a0bd643fc9fe30e1a683839ece649e501ac22b89e60
6
+ metadata.gz: 3d9f643e20c1f6d8e0b255f5c2843f63db7836dd8a61d4961582f639b474f3ebb76d2ab595011319b631e1a65219b91e1307c73366f8544d0f66aaf0b016a550
7
+ data.tar.gz: 631e86ebe4293354623d1b6f0b8b6f5b146795f5f86330b506e1fe1f3a2455d9b3095f3aa67c0f8ecdd349098e7883db34323f76a7ed7a47bbc001fdc6793543
@@ -19,27 +19,27 @@ module MongoidAbility
19
19
 
20
20
  def and_conditions
21
21
  return unless conditions = [or_conditions, closed_ids_condition].compact.presence
22
- { :$and => conditions }
22
+ { '$and' => conditions }
23
23
  end
24
24
 
25
25
  def or_conditions
26
26
  return unless conditions = [closed_types_condition, open_ids_condition].compact.presence
27
- { :$or => conditions }
27
+ { '$or' => conditions }
28
28
  end
29
29
 
30
30
  def closed_types_condition
31
31
  return unless values.closed_types.present?
32
- { :_type.nin => values.closed_types }
32
+ { _type: { '$nin' => values.closed_types } }
33
33
  end
34
34
 
35
35
  def open_ids_condition
36
36
  return unless values.open_types_and_ids.present?
37
- { :_id.in => values.open_types_and_ids.map(&:id) }
37
+ { _id: { '$in' => values.open_types_and_ids.map(&:id) } }
38
38
  end
39
39
 
40
40
  def closed_ids_condition
41
41
  return unless values.closed_ids.present?
42
- { :_id.nin => values.closed_ids }
42
+ { _id: { '$nin' => values.closed_ids } }
43
43
  end
44
44
 
45
45
  # ---------------------------------------------------------------------
@@ -1,3 +1,3 @@
1
1
  module MongoidAbility
2
- VERSION = "0.3.5"
2
+ VERSION = "0.3.6"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mongoid_ability
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.5
4
+ version: 0.3.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tomáš Celizna