mongoid_ability 0.1.2 → 0.1.3

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: 2aef5b23b59b84b83ff5010f4a806daeed9fe1b3
4
- data.tar.gz: f7a05c576b642386f3705bc77cd28acb2704886d
3
+ metadata.gz: 7f2f18aa441d6339b6ddc2cd386d443efcd31df4
4
+ data.tar.gz: 5822292aba839c934257bafe1b139eb78ed3a480
5
5
  SHA512:
6
- metadata.gz: ae51216f99b767b3351a22e2e6b11a6bb25141d217cc091822fdef1803ea887b6c3ebd6e13747745351e53de244fafbc794ce882d733f39dd9052a243bffabd6
7
- data.tar.gz: d99fb0903877b63f809e632758c9879005b148b24320bcd2ca4ca9deef1f277afd5a54daf56771cc5516c3962017e3b0c90019aa7d234f7dc0baadaa18d74630
6
+ metadata.gz: ac4170560d19f57e22c226e080a7fee86bbca9f6e7dcad1a022ee5c693f6ec652f663f866b40ba97dbd0e875f4f40349207e53372d258f33c4b865ac4e94041e
7
+ data.tar.gz: 8463bdda383dfb9561a7b467e33d9779b18d655333a3f45bd498ae7f73cdadb1965308e2c933ea5ed8957dc5c27cbbea782eb4ecf0546eed5d5ac80441068911
@@ -17,7 +17,7 @@ module MongoidAbility
17
17
  scope :for_action, -> action { where(action: action.to_sym) }
18
18
 
19
19
  scope :for_subject_type, -> subject_type { where(subject_type: subject_type.to_s) }
20
- scope :for_subject_id, -> subject_id { where(subject_id: subject_id) }
20
+ scope :for_subject_id, -> subject_id { where(subject_id: subject_id.presence) }
21
21
  scope :for_subject, -> subject { where(subject_type: subject.class.model_name, subject_id: subject.id) }
22
22
 
23
23
  scope :class_locks, -> { where(subject_id: nil) }
@@ -1,3 +1,3 @@
1
1
  module MongoidAbility
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
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.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tomas Celizna