forest_liana 1.5.21 → 1.5.22

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
  SHA1:
3
- metadata.gz: 27c8e19aa86967407c09d0b9ad26728375d81802
4
- data.tar.gz: 7bbd7f79b013753caf4efcdb46f7b868b383e497
3
+ metadata.gz: 66115c380e28a1968e472cb604a4cc6e2cfa6336
4
+ data.tar.gz: 89487bf26d2e6c4bd59f01315307a452cbcdae46
5
5
  SHA512:
6
- metadata.gz: dbd79be573eb462583ec86c8d9694091ad628f6d1d4770a80115a59a937f171af699999235842048ca3bd82e56492cc7cd7cbecbc063b883aefee887d260df07
7
- data.tar.gz: 0c7ebd562b2e2e8892cf8cd4b88a20275d310b5c21dfdd1fe80af78addd2870c7fd2e0288153748c958a73f2b8312286f3c1aeaef62024e08780a0537db3a282
6
+ metadata.gz: d13e6768b5ee702c5b8f0be5f6f9c5c1ebacd02759b1453611800506bbfa5e739612330bdc39dcffd65a8f144657b0ae9b617ef6d4056587e9f27bc86f25f117
7
+ data.tar.gz: 08d88a90f1cfdd1647fc33d75df18f8df5b642991fbb0993cf22f98f1ccb32488e908ccc5ee360edb0ec12d52d1a9d8050a786ae88c329819264459adfc91833
@@ -186,10 +186,11 @@ module ForestLiana
186
186
 
187
187
  collection.fields.delete(field) if field
188
188
  # NOTICE: The foreign key exists, so it's a belongsTo relationship.
189
- elsif field = column_association(collection, association)
190
- field[:reference] = get_ref_for(association)
191
- field[:field] = association.name
192
- field[:inverseOf] = inverse_of(association)
189
+ elsif (field = column_association(collection, association)) &&
190
+ [:has_one, :belongs_to].include?(association.macro)
191
+ field[:reference] = get_ref_for(association)
192
+ field[:field] = association.name
193
+ field[:inverseOf] = inverse_of(association)
193
194
  # NOTICE: Create the fields of hasOne, HasMany, … relationships.
194
195
  else
195
196
  collection.fields << get_schema_for_association(association)
@@ -1,3 +1,3 @@
1
1
  module ForestLiana
2
- VERSION = "1.5.21"
2
+ VERSION = "1.5.22"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: forest_liana
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.21
4
+ version: 1.5.22
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sandro Munda
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-04-04 00:00:00.000000000 Z
11
+ date: 2017-04-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails