Module: Reform::Form::Sync::Representer

Defined in:
lib/reform/form.rb

Overview

Writes input to model.

Instance Method Summary collapse

Instance Method Details

#from_hashObject



190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
# File 'lib/reform/form.rb', line 190

def from_hash(*)
  nested_forms do |attr, model|
    attr.options.merge!(
      :decorator => attr.options[:form].representer_class
    )

    if attr.options[:form_collection]
      attr.options.merge!(
        :collection => true
      )
    end
  end

  super
end