caprese 0.3.8.2 → 0.3.8.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: 57fbafc367c38c190ab2f8569f611fe7fcd15b41
4
- data.tar.gz: 3b87a627fc1d9d5ceec4800bcabbadd4a7804e54
3
+ metadata.gz: 8b8b27506d0cd33d57f03042bd5bd0c7be987730
4
+ data.tar.gz: b3708630cabe7011f3de68c17a54a5f128f4dc11
5
5
  SHA512:
6
- metadata.gz: 95583cbe3d541dffbfae8ee75f8238d9db546509c68e02e6fff8d70d957d6efd5c4212d47d38b3e9423d3974a39f73348a87b03d6fe32a19f15d8c9fc26f62ed
7
- data.tar.gz: b3e92acbd2619b2f26ecd6bea8ba7d4c052f41cc024fccc2449d4f2ca45b3045a5ce06f46f7c111f346607497f0dcb5a325ca95f0a513a182069c87f67ffc037
6
+ metadata.gz: a54992da065f6bbd7c7e5e6bdcb14886bcd8b9525a787e7ec4bc45f51925f321341d5e302536bbfc75a7b3c7e30715a9f197c4c49e703b175d5a630e1697efd0
7
+ data.tar.gz: 8a2549e77243b43fa82e941977bc6c22f90cdf0af50b10e4af12caf724b4487d1290510f5c39184c64ab9229108f545f83c9c48f42fb9985f1aa4ba179683b30
data/CHANGELOG.md CHANGED
@@ -47,3 +47,7 @@
47
47
  ## 0.3.8.2
48
48
 
49
49
  * Fix rendering of nested relationship base errors (17dc96f)
50
+
51
+ ## 0.3.8.3
52
+
53
+ * Fix `persist_collection_relationships` to not include `through` relationships
@@ -327,7 +327,7 @@ module Caprese
327
327
  # This methods persists the collection relation(s) pushed onto the record's association target(s)
328
328
  def persist_collection_relationships(record)
329
329
  record.class.reflect_on_all_associations
330
- .select { |ref| ref.collection? && record.association(ref.name).any? }
330
+ .select { |ref| ref.collection? && !ref.through_reflection? && record.association(ref.name).any? }
331
331
  .map do |ref|
332
332
  [
333
333
  ref.has_inverse? ? ref.inverse_of.name : ref.options[:as],
@@ -1,3 +1,3 @@
1
1
  module Caprese
2
- VERSION = '0.3.8.2'
2
+ VERSION = '0.3.8.3'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: caprese
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.8.2
4
+ version: 0.3.8.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nick Landgrebe