Module: Reform::Form::Sync::Writeable

Included in:
Reform::Form::Sync
Defined in:
lib/reform/form/sync.rb

Overview

Excludes :virtual and readonly properties from #sync in this form.

Instance Method Summary collapse

Instance Method Details

#sync_hash(options) ⇒ Object



89
90
91
92
93
94
95
# File 'lib/reform/form/sync.rb', line 89

def sync_hash(options)
  readonly_fields = mapper.fields { |dfn| dfn[:_writeable] == false }

  options.exclude!(readonly_fields.map(&:to_sym))

  super
end