object_attorney 2.6.9 → 2.6.10

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
- N2JiOWE3MWRlMDhmY2UwYzA2OTgwYmI4MTI0NDhkMzc4ZTkyNjBjYw==
4
+ NGQ1MTE1YzQwMDc3MWRmMmJjZjQ3Y2IwZDRmMWE0ZmY5ODRiNjg1NQ==
5
5
  data.tar.gz: !binary |-
6
- MDM5ZGQyYzg4Yzg0NTkyY2I3NzY3OWU0YTk0ZGM0MzIyZWU2MDU3MQ==
6
+ ZGE1ODliODdjZTRjNjkwYTM2ZDljZjRhYTk4OTA3NmRiZWI1ZGI3MA==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- NzFiNGU0Yjg0ODBkYjdjZWUzMzUzOGM5ODAxNDM0NzE5YTY5ODkzMWU1OGEz
10
- ZDM1OWNiNjI5NmQ4MjZjYzE5MTM0ZGYxMDc1ZTM1ZDQ5OGU3NzU2NmRmMWZk
11
- NTM3ZTQ0ZGUyODM1YjAwNzA4ODE2NzIwNzljNDMxZmFmMjlhYjE=
9
+ ZjJmYThhYTg2MmRmYzkyNmJiYTdlNDg3NGQ1Mzc5ZGQwNTE0YjMyZDM1MzM2
10
+ OTNhYzNhN2JjODc5MmUwNWQ5MjNiMWI4NTE1Zjg0YTRmMjViMmE1ODU5YWMz
11
+ OWJlYjI3Njc1ODgwNTlmNWZmOTM2MmNhMDJiOGExMGFiYWNiZTA=
12
12
  data.tar.gz: !binary |-
13
- YTZkYWY4NmUzMDAxZjBiZmE5MWVjNDdiMGM3YjAzNzFhMzAyZmI1NmRiZDM0
14
- ODE1NjcyOWJlZmVlZjYzYTdiYmM5MjljOTNiMjRkM2ViZTk0YjAwNzkxNDk3
15
- MjIxNDE2MWY3MDIxZDVhYjcyMzIzYjQ0MGE5NzlhMjAwMTk5ODk=
13
+ ZGIxM2EyM2MyMGViYTlmNDgzODU3MTQ3MDE3YWUyNjYyZjMyMWJmODc0ODc5
14
+ NDE4YzBjNDdhZTkzZWZkOTUwMzY5NTA2MDQ3MDgzNTE0YzJiNzA3MTE4Mzdh
15
+ NTQ5YmYxNWViYWFkMDFjYjQxYjAwODMwNTcyMDUxMmJmNzZlYWI=
@@ -154,7 +154,7 @@ module ObjectAttorney
154
154
  def build_nested_object(nested_object_name, attributes = {})
155
155
  reflection = self.class.reflect_on_association(nested_object_name)
156
156
 
157
- return nil if reflection.options[:no_new_records]
157
+ return nil if reflection.options[:new_records] == false
158
158
 
159
159
  if can_represented_object_build_nested?(reflection, nested_object_name)
160
160
  new_nested_object = build_from_represented_object(reflection, nested_object_name)
@@ -199,7 +199,7 @@ module ObjectAttorney
199
199
  def existing_nested_objects(nested_object_name)
200
200
  nested_relection = self.class.reflect_on_association(nested_object_name)
201
201
 
202
- return [] if nested_relection.options[:no_existing_records]
202
+ return [] if nested_relection.options[:existing_records] == false
203
203
 
204
204
  existing = represented_object.nil? ? (nested_relection.klass.try(:all) || []) : (represented_object.send(nested_object_name) || (nested_relection.has_many? ? [] : nil))
205
205
 
@@ -1,3 +1,3 @@
1
1
  module ObjectAttorney
2
- VERSION = "2.6.9"
2
+ VERSION = "2.6.10"
3
3
  end
@@ -4,6 +4,6 @@ class PostWithOnlyExistingCommentsForm
4
4
 
5
5
  represents :post, properties: [:title, :body]
6
6
 
7
- has_many :comments, no_new_records: true
7
+ has_many :comments, new_records: false
8
8
 
9
9
  end
@@ -4,6 +4,6 @@ class PostWithOnlyNewCommentsForm
4
4
 
5
5
  represents :post, properties: [:title, :body]
6
6
 
7
- has_many :comments, no_existing_records: true
7
+ has_many :comments, existing_records: false
8
8
 
9
9
  end
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.6.9
4
+ version: 2.6.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - João Gonçalves