object_attorney 2.2.4 → 2.2.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/lib/object_attorney/nested_objects.rb +1 -1
- data/lib/object_attorney/version.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
OTA4OTVjZjA2YTQxNTgwMzJlYThkYmVkMzU4M2M1MmY4ODUzM2RjOA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
Njc5MjUzNjdiZWUwNWY4NmNmZmNhMTY4OGQ3YTNhZmNkOTczNTA2ZQ==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
OGFjYWQ2ZWM5ODE1YmJlNmQ1YTY2YmYxZDNkZTM4YTM0N2FhMjBkOTU4NTNk
|
10
|
+
NjMxMGUzNjhjNWUwYzE2OGQ3NDc0ZDA2NmE4MDAzM2YwNmExMjc4ZjEyNDE0
|
11
|
+
Y2VjNDA1MWRiN2NkZmRiNTlmNWIwMjM2ZjY5MzI5YzUzMWVhMzE=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
ZGU3MmU1NmY5NzFjYTkwMTM5YmNkNWNjYWUwODgxN2FjNmY0YjdmNjhkMzMw
|
14
|
+
NzgwMDk0Yzc3OTRiYjM3OGFjMTI0ZTQzNDhhMTBjNTU5MWQxNGM4NTAyOTZl
|
15
|
+
NGI5ZTlkNjVhMmIwNmRmODg5Nzg2ODdkY2E3ODZhMDc0OWNjMWY=
|
@@ -188,7 +188,7 @@ module ObjectAttorney
|
|
188
188
|
existing = represented_object.blank? ? nested_relection.klass.all : represented_object.send(nested_object_name)
|
189
189
|
existing ||= (nested_relection.has_many? ? [] : nil)
|
190
190
|
|
191
|
-
if represented_object.present? && nested_relection.klass != self.class.represented_object_class.reflect_on_association(nested_object_name).try(:klass)
|
191
|
+
if represented_object.present? && existing.respond_to?(:map) && nested_relection.klass != self.class.represented_object_class.reflect_on_association(nested_object_name).try(:klass)
|
192
192
|
existing = existing.map { |existing_nested_object| nested_relection.klass.new({}, existing_nested_object) }
|
193
193
|
end
|
194
194
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: object_attorney
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.2.
|
4
|
+
version: 2.2.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- João Gonçalves
|
@@ -157,3 +157,4 @@ test_files:
|
|
157
157
|
- spec/support/models/comment.rb
|
158
158
|
- spec/support/models/post.rb
|
159
159
|
- spec/support/models/user.rb
|
160
|
+
has_rdoc:
|