active_preview 0.1.4 → 0.1.5

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
  SHA256:
3
- metadata.gz: fa0eff7423ed082c549f1cb8cb02eb8f374699eec3fff26ff1593c1bd4743b54
4
- data.tar.gz: eed3a8642e9b2344f6effe820a3bc0b4bb206e9e130f5cdc2decaef0b2d27649
3
+ metadata.gz: fae3f57a09814a0c60abb7fd23e38046d0f70825f1d87e6c3e6545479c3f58c8
4
+ data.tar.gz: c87448e91996b3c4a4281417f5b7c5a9277b5b323ccdb67e64e1ad62c29b7b15
5
5
  SHA512:
6
- metadata.gz: 3102cad76553d2d26884c82c8e9f861d3e474690cc1d07a3e45eedf391b166780f5209b1928fff12b3fb58d5c5abe26bee9f126d9d7c5e881d6d3dd8902bfdd7
7
- data.tar.gz: 3579c8ac488d465b7f7cdbce5037eaad84bf25a183aa39221344875034da1051ad0805e432a0b51492ae8c77cd1074459239dbb7f181f0a13c83205fb0531300
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
@@ -1,3 +1,3 @@
1
1
  module ActivePreview
2
- VERSION = "0.1.4"
2
+ VERSION = "0.1.5"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_preview
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Syd Young