Module: Reform::Form::ActiveModel
- Defined in:
- lib/reform/form/active_model.rb
Defined Under Namespace
Modules: ClassMethods, FormBuilderMethods
Class Method Summary collapse
Class Method Details
.included(base) ⇒ Object
48 49 50 51 52 53 54 55 56 57 58 59 |
# File 'lib/reform/form/active_model.rb', line 48 def self.included(base) base.class_eval do extend ClassMethods features << ActiveModel delegate [:persisted?, :to_key, :to_param, :id] => :model def to_model # this is called somewhere in FormBuilder and ActionController. self end end end |