Module: Reform::Form::Sync::InputRepresenter

Includes:
EmptyAttributesOptions, ReadonlyAttributesOptions, Representer::WithOptions
Defined in:
lib/reform/form/sync.rb

Overview

Transforms form input into what actually gets written to model. output: “Mint Car”, hit: <Form>

Instance Method Summary collapse

Methods included from ReadonlyAttributesOptions

#options

Methods included from EmptyAttributesOptions

#options

Methods included from Representer::WithOptions

#from_hash, #options

Instance Method Details

#to_hashObject



31
32
33
34
35
36
37
38
39
40
41
# File 'lib/reform/form/sync.rb', line 31

def to_hash(*)
  nested_forms do |attr|
    attr.merge!(
      :representable  => false,
      :prepare        => lambda { |obj, *| obj }
    )

  end

  super
end