active_preview 0.1.4 → 0.1.5
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/active_preview/builder.rb +1 -1
- data/lib/active_preview/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: fae3f57a09814a0c60abb7fd23e38046d0f70825f1d87e6c3e6545479c3f58c8
|
|
4
|
+
data.tar.gz: c87448e91996b3c4a4281417f5b7c5a9277b5b323ccdb67e64e1ad62c29b7b15
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 57d3e237ce7f66645fa9481cc8688014f552b39c8606f8c1e970485d86953506382a04ac695c5a85146928bd14da2ad3accb79f5225329c8ac513fd8d25a96dd
|
|
7
|
+
data.tar.gz: 3e5035d889c074ea9714e67bd7caa1ea867641d506d3cf7d74020958377e2d7fe9d26c24ac067f2931e909d09b55be327ad639c755d23512e22b57a18380af59
|
|
@@ -74,7 +74,7 @@ module ActivePreview
|
|
|
74
74
|
next if updated_associations.include? a
|
|
75
75
|
next if preview.ignored_associations.include? a
|
|
76
76
|
saved = [*model.send(a)]
|
|
77
|
-
next if saved.empty?
|
|
77
|
+
next if saved.empty? || !saved.first.respond_to?(:preview)
|
|
78
78
|
to_assign = BatchBuilder.build(klass: saved.first.class,
|
|
79
79
|
saved_models: saved, parent: preview)
|
|
80
80
|
to_assign = to_assign.first if singular? a
|