Module: Reform::Form::ActiveModel::FormBuilderMethods
- Defined in:
- lib/reform/form/active_model.rb
Overview
TODO: rename to FormBuilderCompat.
Defined Under Namespace
Modules: ClassMethods
Class Method Summary collapse
Instance Method Summary collapse
-
#update!(params) ⇒ Object
Modify the incoming Rails params hash to be representable compliant.
Class Method Details
.included(base) ⇒ Object
5 6 7 8 9 10 |
# File 'lib/reform/form/active_model.rb', line 5 def self.included(base) base.class_eval do extend ClassMethods # ::model_name register_feature FormBuilderMethods end end |
Instance Method Details
#update!(params) ⇒ Object
Modify the incoming Rails params hash to be representable compliant.
28 29 30 31 32 33 34 35 |
# File 'lib/reform/form/active_model.rb', line 28 def update!(params) return super unless params.is_a?(Hash) # TODO: run this only for hash deserialization, but generically (#deserialize_hash ?). self.class.representer { |dfn| rename_nested_param_for!(params, dfn) } super end |