Module: Reform::Form::Save::NestedHash
- Defined in:
- lib/reform/form/save.rb
Instance Method Summary collapse
Instance Method Details
#to_hash ⇒ Object
38 39 40 41 42 43 44 45 46 47 48 49 50 51 |
# File 'lib/reform/form/save.rb', line 38 def to_hash(*) # Transform form data into a nested hash for #save. nested_forms do |attr| attr.merge!( :serialize => lambda { |object, args| object.to_nested_hash } ) end representable_attrs.each do |attr| attr.merge!(:as => attr[:private_name] || attr.name) end super end |