Module: Protobuf::ActiveRecord::NestedAttributes::ClassMethods

Defined in:
lib/protobuf/active_record/nested_attributes.rb

Instance Method Summary collapse

Instance Method Details

#accepts_nested_attributes_for(*attr_names) ⇒ Object

:nodoc



20
21
22
23
24
25
26
27
# File 'lib/protobuf/active_record/nested_attributes.rb', line 20

def accepts_nested_attributes_for(*attr_names)
  attribute_names = attr_names.dup
  attribute_names.extract_options!

  super

  self._protobuf_nested_attributes += attribute_names.map { |name| "#{name}_attributes" }
end