object_attorney 2.6.0 → 2.6.1

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
- ZGFkZjIwNjQ2MzM4NmU5YTYxZGU3ODViMWIwNGM5YzY5NmVhYzVjOA==
4
+ NGI5MTNkZDE0MmUyOWMyZTFmMjgwZWVmMDgyMGY3YjIyZGRjMzFiOA==
5
5
  data.tar.gz: !binary |-
6
- NzIzNGI4MzI1ZmRlZGQxMTM2ZWQwNDk0ZWUzN2M0MTkwZGUwMDFiMQ==
6
+ MzU5Y2EwOWY5MzA5NzE5ZWEyZDA5NjdlMTc3Y2U3N2FlNGU3MmU2MQ==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- ZmQ5ZjQ5YTFhYjgzYmJiZTIyYjM0MzI1MjNmYjg0NmViYjk5MmJlMDYwMGRi
10
- OGFjYmQ2MTNlZjUxMTIyNTJmOTgwODhiNGMyMWQ3ZmNhMDI3NmY2MGE0Y2Y4
11
- ZjIzNjg2YzE1MjFhODdmM2VlM2ZlYWEzZWRiY2M5NTExN2U4NmI=
9
+ ODMwNmIzMjJiZWY0NGYxZjlhMjE1NzJlZmYzOTNhODE4M2VlMmFkNzU3YTA2
10
+ Mjg5MzczMjMwYmI5YmE0NmQ5M2FiMTJlODQ4MWM2OWQ4YjlmYmFiN2Q3Njgz
11
+ NWFkZTU3OWE5Njk5ODk4NjUzMDNhYmM0NDE4MzA3YWNhYmM4YTc=
12
12
  data.tar.gz: !binary |-
13
- MzY2M2JhOWFmNzM3NmM1MmU1ZDYzNTljMTliZWQwZTA0YWI2ODAzNDE3ZTQ1
14
- ZjM0NDE5NDIwMzc2ZDU0MDM0NTgyNDUyYWRhZjBlMWYzYTk3YzA3NWNiYzhj
15
- ZWU1NTc4YzJhY2M2Nzc3YmZlYzkwMmMxYmRjODIzOGE5N2Q0MDM=
13
+ OThjNGRhYThjZmU2NWQ4OGU2ZGY5YzU5MzVkODNiMDViYjM5OGY4N2I5OGQ3
14
+ OTc3YjRhNWMyMTEwNTFmMWUyYjhhN2ZjNTMyNDEyMzM1MThkMjc5YjExMTE1
15
+ OWNkZmUzMDFhZDU0OTdiMTk4ZDk1NzM4ZGFjMTZhZTExOTg1OTU=
@@ -235,8 +235,6 @@ module ObjectAttorney
235
235
  define_method(nested_object_name) { nested_getter(nested_object_name) }
236
236
  define_method("build_#{reflection.single_name}") { |attributes = {}, nested_object = nil| build_nested_object(nested_object_name, attributes) }
237
237
  define_method("existing_#{nested_object_name}") { existing_nested_objects(nested_object_name) }
238
-
239
- define_nested_ids_accessor(nested_object_name, reflection)
240
238
  end
241
239
 
242
240
  def association_reflections
@@ -254,23 +252,6 @@ module ObjectAttorney
254
252
 
255
253
  private ############################### PRIVATE METHODS ###########################
256
254
 
257
- # def define_nested_attributes_accessor(nested_object_name)
258
- # self.send(:attr_writer, "#{nested_object_name}_attributes".to_sym)
259
- # module_eval <<-RUBY_EVAL, __FILE__, __LINE__ + 1
260
- # def #{nested_object_name}_attributes; @#{nested_object_name}_attributes ||= {}; end
261
- # RUBY_EVAL
262
- # end
263
-
264
- def define_nested_ids_accessor(nested_object_name, reflection)
265
- return nil unless reflection.has_many?
266
-
267
- module_eval <<-RUBY_EVAL, __FILE__, __LINE__ + 1
268
- def #{reflection.single_name}_ids
269
- @#{reflection.single_name}_ids ||= nested_object_name.map(&:#{reflection.primary_key})
270
- end
271
- RUBY_EVAL
272
- end
273
-
274
255
  def accepts_nested_objects_overwrite_macro(nested_object_name, options, macro)
275
256
  default_options = { macro: macro }
276
257
  options = options.is_a?(Hash) ? options.merge(default_options) : default_options
@@ -1,3 +1,3 @@
1
1
  module ObjectAttorney
2
- VERSION = "2.6.0"
2
+ VERSION = "2.6.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: object_attorney
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.6.0
4
+ version: 2.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - João Gonçalves
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-01-20 00:00:00.000000000 Z
11
+ date: 2014-01-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler