module ActiveType::NestedAttributes::ClassMethods
Public Instance Methods
nests_many(association_name, options = {})
click to toggle source
# 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 = {})
click to toggle source
# 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
Private Instance Methods
generated_nested_attribute_methods()
click to toggle source
# File lib/active_type/nested_attributes.rb, line 26 def generated_nested_attribute_methods @generated_nested_attribute_methods ||= begin mod = Module.new include mod mod end end