cancancan-neo4j 1.3.3 → 1.3.4

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: 2ae5ee22d10e4012c9383c63fe107079a5eba830
4
- data.tar.gz: 877f1e8cf20ff1757dbd5a791c7eaac3e8155650
3
+ metadata.gz: 15cd5f1644e28e0c4f373e4cfd92748bb40ab326
4
+ data.tar.gz: a6c2b954cc7c9d703447b5cc422cdda35e54afa6
5
5
  SHA512:
6
- metadata.gz: 577ba1d3683e10289d2f20904da573854264c3922b1789ddb3b4f501ef1a5c7c7f818eaaa6bddffd008f46c66501dd50b1b2fd30ea5055a1bc4787b02a563e22
7
- data.tar.gz: 92ed995416b5f47493502383bd3533bbac9f3dd6792169a1db74f8463ecdf96c897105c328583b371d92b73f72f52891bda890262872ab86e739eb9dddb97adf
6
+ metadata.gz: 31514fe09287d9ae199db267a0e8dfd52a3cfae57b61435b4601a16b743ef13610a2d4b4f9960687eeaa9531683e62a8589134a34162c9aec735cede901263aa
7
+ data.tar.gz: 9876f895592dc560006854f845b19a94aebf6ef9dae81a69a4511ce27079142c3cc9a113c919f87b32231822917bee8232ab751370f0f24ae80fec912f99892d
@@ -6,7 +6,7 @@ CanCan::ConditionsMatcher.module_eval do
6
6
  return nested_subject_matches_conditions?(subject) if subject.class == Hash
7
7
  return matches_conditions_hash?(subject) unless subject_class?(subject)
8
8
  end
9
- if @conditions.is_a?(::Neo4j::ActiveNode::Query::QueryProxy)
9
+ if @conditions.is_a?(::Neo4j::ActiveNode::Query::QueryProxy) || @conditions.is_a?(::Neo4j::ActiveNode::HasN::AssociationProxy)
10
10
  return @conditions.where(id: subject.id).exists? unless subject_class?(subject)
11
11
  end
12
12
  # Don't stop at "cannot" definitions when there are conditions.
@@ -12,7 +12,7 @@ module CanCanCan
12
12
 
13
13
  def records
14
14
  conds = rule.conditions
15
- return conds if conds.is_a?(::Neo4j::ActiveNode::Query::QueryProxy)
15
+ return conds if conds.is_a?(::Neo4j::ActiveNode::Query::QueryProxy) || conds.is_a?(::Neo4j::ActiveNode::HasN::AssociationProxy)
16
16
  return records_for_no_conditions if conds.blank?
17
17
  records_for_hash_conditions
18
18
  end
@@ -2,6 +2,6 @@ module CanCanCan
2
2
  end
3
3
  module CanCanCan
4
4
  module Neo4j
5
- VERSION = '1.3.3'.freeze
5
+ VERSION = '1.3.4'.freeze
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cancancan-neo4j
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.3
4
+ version: 1.3.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Amit Suryavanshi