Module: WellFormed::WithUser::ClassMethods
- Defined in:
- lib/well_formed/with_user.rb
Instance Method Summary collapse
-
#_nested_form_builder(synthetic_name, &block) ⇒ Object
Builds an anonymous nested form class rooted at NestedForm.
Instance Method Details
#_nested_form_builder(synthetic_name, &block) ⇒ Object
Builds an anonymous nested form class rooted at NestedForm.
22 23 24 25 26 27 28 |
# File 'lib/well_formed/with_user.rb', line 22 def _nested_form_builder(synthetic_name, &block) form_class = Class.new(WellFormed::NestedForm, &block) form_class.define_singleton_method(:model_name) do ActiveModel::Name.new(self, nil, synthetic_name) end form_class end |