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



85
86
87
88
89
90
91
# File 'lib/reform/form/sync.rb', line 85

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

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

  super
end