cancancan-neo4j 1.0.2 → 1.0.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: 148fb171b87ba1ffbb6445fbc94d784f17e0c7a5
4
- data.tar.gz: 2a51eae6389c590145df0a17d06febd46d36cdf5
3
+ metadata.gz: fc6540031583b7f96c4143b5536b303ac76f0c21
4
+ data.tar.gz: 3a1f772cec756e1ddf03039fc164a5a3814dc3a6
5
5
  SHA512:
6
- metadata.gz: b91b481d4fd5c21a46679e639a66e01245edb84b1e0bbcf295f2a5ead6202b6a08e7fea7541f8331dc82f9a2d52fee32fcda8bf124f0351176aaf8fa94c4e7b5
7
- data.tar.gz: d4d5388127d1ec21c0f107fa5fedf6b92e5187cb0fd5871cdc615091f8ba32da1dd8afda2c56dded956117f2903c0cfc6a8c037b67b3d2922a5d036752e122ce
6
+ metadata.gz: d81cd6bd8f6edceb1277134351fc34d9c1af8cedbed19c1bfcea2e41ea26dcc463b696d6bb8371f604c1300afd2237b9f338c798924233266f7aa534a91acf0d
7
+ data.tar.gz: 593f125d2bdefa76bca27dcf00fd318a220c200df7990742cf5e84ce85140cf9f1ed8a54bfa306f3e4c8694c41932e91e747d8fc858534aa213657c507f3940b
@@ -65,8 +65,9 @@ module CanCan
65
65
  def self.associations_conditions_match?(conditions, subject, base_class)
66
66
  return true if conditions.blank?
67
67
  conditions.all? do |association, conditions_hash|
68
- current_model = base_class.associations[association].target_class
69
68
  current_subject = subject.send(association)
69
+ return false unless current_subject
70
+ current_model = base_class.associations[association].target_class
70
71
  all_conditions_match?(current_subject, conditions_hash, current_model)
71
72
  end
72
73
  end
@@ -2,6 +2,6 @@ module CanCanCan
2
2
  end
3
3
  module CanCanCan
4
4
  module Neo4j
5
- VERSION = '1.0.2'.freeze
5
+ VERSION = '1.0.3'.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.0.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Amit Suryavanshi