Method: Reform::Form::Sync#sync!
- Defined in:
- lib/reform/form/sync.rb
#sync!(options) ⇒ Object
reading from fields allows using readers in form for presentation and writers still pass to fields in #validate????
12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/reform/form/sync.rb', line 12 def sync!() # semi-public. = Reform::Representer::Options[.merge(:form => self)] # options local for this form, only. input = sync_hash() # if aliased_model was a proper Twin, we could do changed? stuff there. .delete(:exclude) # TODO: can we use 2 options? dynamic_sync_representer.new(aliased_model).from_hash(input, ) # sync properties to Song. model end |