Module: ActiveModel::FormObject::ClassMethods
- Defined in:
- lib/active_model/form_object.rb
Instance Method Summary collapse
Instance Method Details
#model_name ⇒ Object
27 28 29 |
# File 'lib/active_model/form_object.rb', line 27 def model_name ActiveModel::Name.new(self, nil, self.name.split(/(?=[A-Z])/).first) end |
#new(*args, &block) ⇒ Object
21 22 23 24 25 |
# File 'lib/active_model/form_object.rb', line 21 def new(*args, &block) args = [{}] if args == [] create_accessors(*args) allocate_and_init(*args, &block) end |