mongoid_ability 0.1.11 → 0.1.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/mongoid_ability/resolve_owner_locks.rb +3 -0
- data/lib/mongoid_ability/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 64d2891bd03cfe98748018e40712b68c81a26467
|
|
4
|
+
data.tar.gz: 3f2acac21ea83819168a2067d6301bb2b9d7e5c8
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 316adff0b176f72a3c466c994f2b21ce2dfa9e46c6f4deb9c22f88b649ba5418e75c05600e73053594bd1ae79d96177da2c9f4b2e79fd39429740566ebed9a27
|
|
7
|
+
data.tar.gz: b6a891d92177bf8d0c0e94fb96b6b35a1b8e98517e8c4c9962558ce23eadb5035718da235ae273c47935debedd10cf520546913da54961606b80aec01e23228e
|
|
@@ -2,6 +2,9 @@ module MongoidAbility
|
|
|
2
2
|
class ResolveOwnerLocks < ResolveLocks
|
|
3
3
|
|
|
4
4
|
def call
|
|
5
|
+
# FIXME: this is not a very nice fix
|
|
6
|
+
return unless owner.respond_to?(:locks_relation)
|
|
7
|
+
|
|
5
8
|
locks_for_subject_type = owner.locks_relation.for_action(action).for_subject_type(subject_type)
|
|
6
9
|
|
|
7
10
|
return unless locks_for_subject_type.exists?
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: mongoid_ability
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.12
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Tomas Celizna
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2015-
|
|
11
|
+
date: 2015-10-01 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: cancancan
|