croods 0.2.3 → 0.2.4
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/croods/policy/scope.rb +2 -4
- data/lib/croods/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 59599cc31e9e3b596fe761b140365fb2efcd9c319dc7e60b94c491ad94f9cee3
|
|
4
|
+
data.tar.gz: 0b551e14af91d32e9f69c44a0a23a40f235b8929127b28cce5fc96dcd077c385
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 25a199ab073a4fd7156fb97cf4628a6033e49269df3dc83ed34647b2411897f0bba5658a22cbd40d0590938b9d9059739d66021efc39ee62a6eb5b6b6bda10e9
|
|
7
|
+
data.tar.gz: 16a87c71799fd7f0cf5dd05ad3a16d9566918ae85074a1e719f9e085b8c25b7761bb09b3a3b3a53ce3c41be0b0adc696ec6c0f76d1329c37700c63785d5e3566
|
data/lib/croods/policy/scope.rb
CHANGED
|
@@ -37,16 +37,14 @@ module Croods
|
|
|
37
37
|
|
|
38
38
|
associations = scope.reflect_on_all_associations(:belongs_to)
|
|
39
39
|
|
|
40
|
-
return path if associations.empty?
|
|
41
|
-
|
|
42
40
|
associations.each do |association|
|
|
43
41
|
model = association.class_name.constantize
|
|
44
42
|
expanded_path = path + [association]
|
|
45
43
|
association_path = reflection_path(model, target, expanded_path)
|
|
46
|
-
return association_path
|
|
44
|
+
return association_path unless association_path.empty?
|
|
47
45
|
end
|
|
48
46
|
|
|
49
|
-
|
|
47
|
+
[]
|
|
50
48
|
end
|
|
51
49
|
|
|
52
50
|
def joins(path)
|
data/lib/croods/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: croods
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.
|
|
4
|
+
version: 0.2.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Daniel Weinmann
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2020-05-
|
|
11
|
+
date: 2020-05-06 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: committee
|