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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7a0a091b4f81e2b96a736954d7aab969b2330e677244c7ac750313a2076da5bc
4
- data.tar.gz: ba0ac8dab04f32472fe82c48fb7a077b6620cc94e8d277e3cd99b9ed665a858b
3
+ metadata.gz: 59599cc31e9e3b596fe761b140365fb2efcd9c319dc7e60b94c491ad94f9cee3
4
+ data.tar.gz: 0b551e14af91d32e9f69c44a0a23a40f235b8929127b28cce5fc96dcd077c385
5
5
  SHA512:
6
- metadata.gz: 43c835cbdd0fdb404d09d785b493f3944eab5b452147e46ac11bbae77ce144f95ca46c77449b06327ac98e7fbfc48e1124e959a46ff9f6bdc64d54b75cf9d437
7
- data.tar.gz: 5413ebaf8683673e5418b2aabcffbe24687d8bb1c361ba61bec88d2cc371cb1591fc5519045015ec0871df72ea2643380cbf746d666886ea3bb365013d27fa34
6
+ metadata.gz: 25a199ab073a4fd7156fb97cf4628a6033e49269df3dc83ed34647b2411897f0bba5658a22cbd40d0590938b9d9059739d66021efc39ee62a6eb5b6b6bda10e9
7
+ data.tar.gz: 16a87c71799fd7f0cf5dd05ad3a16d9566918ae85074a1e719f9e085b8c25b7761bb09b3a3b3a53ce3c41be0b0adc696ec6c0f76d1329c37700c63785d5e3566
@@ -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 if association_path != path
44
+ return association_path unless association_path.empty?
47
45
  end
48
46
 
49
- path
47
+ []
50
48
  end
51
49
 
52
50
  def joins(path)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Croods
4
- VERSION = '0.2.3'
4
+ VERSION = '0.2.4'
5
5
  end
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.3
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-05 00:00:00.000000000 Z
11
+ date: 2020-05-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: committee