object_attorney 2.2.7 → 2.2.8
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,15 +1,15 @@
|
|
|
1
1
|
---
|
|
2
2
|
!binary "U0hBMQ==":
|
|
3
3
|
metadata.gz: !binary |-
|
|
4
|
-
|
|
4
|
+
Yjc5Y2ViZmM5MzFkZGYyOTBkYzhhOTI2ZmNiNzE3MDhlM2JmMzI1Nw==
|
|
5
5
|
data.tar.gz: !binary |-
|
|
6
|
-
|
|
6
|
+
ZDJiY2M1NjRhZjM3NGJlNTYxYjEyYmMwMDk3MzJhYWM0NWRlNjVkNw==
|
|
7
7
|
SHA512:
|
|
8
8
|
metadata.gz: !binary |-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
ZGYxODJhYjlmNWQ3NTFlNWQ2NzQzZGM2NGNkMjVhZTdmNDc2OTZhYmYzOTU5
|
|
10
|
+
NDY2ZjgxZjZiNmQ4YTlkZTcyMzQ2ZmVhMDAyZmExOThmYTFlNjQ2NTAwZDkw
|
|
11
|
+
NjEyNzY0ZDAwNGQ1NmE4MmNiYThkMjQ1NmM5NTYwZGYzYzI4ZDE=
|
|
12
12
|
data.tar.gz: !binary |-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
ODkyYjg5YjZhNThjYjA1ZGEwNmFmNDVlZGFmNjc2OTZjMGM2YmE4NDk5ZWJh
|
|
14
|
+
MmE4OTQ3MzM3YTBjMzExMzhjY2I2MzEwNmY5MjNkZjgyYWU1MDQyZTg4NDFk
|
|
15
|
+
YzY3M2FhMTVhNzg3Mjk4ZTA5NjEzZWE1YzIyNDVlNTUxYWViY2U=
|
|
@@ -5,7 +5,7 @@ module ObjectAttorney
|
|
|
5
5
|
|
|
6
6
|
def initialize_nested_attributes
|
|
7
7
|
self.class.reflect_on_all_associations.each do |reflection|
|
|
8
|
-
self.instance_variable_set("@#{reflection.name}
|
|
8
|
+
self.instance_variable_set("@#{reflection.name}_attributes", {})
|
|
9
9
|
end
|
|
10
10
|
end
|
|
11
11
|
|
|
@@ -44,4 +44,10 @@ describe PostWithCommentsAndAddressForm do
|
|
|
44
44
|
address.city.should == 'city'
|
|
45
45
|
end
|
|
46
46
|
|
|
47
|
+
it "2. Checking is nestes attributes ':comments' and ':address' are initialized" do
|
|
48
|
+
post_form = described_class.new
|
|
49
|
+
post_form.comments_attributes.should == {}
|
|
50
|
+
post_form.address_attributes.should == {}
|
|
51
|
+
end
|
|
52
|
+
|
|
47
53
|
end
|