Module: FormObject::Dsl::InstanceMethods
- Defined in:
- lib/form_object/dsl/instance_methods.rb
Instance Method Summary collapse
Instance Method Details
#assign_model(model_instance) ⇒ Object
11 12 13 14 |
# File 'lib/form_object/dsl/instance_methods.rb', line 11 def assign_model( model_instance ) @model = model_instance self.attributes = @model.form_object_attributes end |
#model ⇒ Object
5 6 7 8 9 |
# File 'lib/form_object/dsl/instance_methods.rb', line 5 def model raise ModelUndefinedError.new(self) unless @model @model.assign_form_object_attributes(self) @model end |