Module: ActiveType::NestedAttributes::ClassMethods

Defined in:
lib/active_type/nested_attributes.rb

Instance Method Summary collapse

Instance Method Details

#nests_many(association_name, options = {}) ⇒ Object



19
20
21
# File 'lib/active_type/nested_attributes.rb', line 19

def nests_many(association_name, options = {})
  Builder.new(self, generated_nested_attribute_methods).build(association_name, :many, options)
end

#nests_one(association_name, options = {}) ⇒ Object



15
16
17
# File 'lib/active_type/nested_attributes.rb', line 15

def nests_one(association_name, options = {})
  Builder.new(self, generated_nested_attribute_methods).build(association_name, :one, options)
end