Class: Reform::Form::Populator::Sync

Inherits:
Reform::Form::Populator show all
Defined in:
lib/reform/form/populator.rb

Overview

Sync (default) blindly grabs the corresponding form twin and returns it. This might imply that nil is returned, and in turn #validate! is called on nil.

Instance Method Summary collapse

Methods inherited from Reform::Form::Populator

#call, #initialize

Constructor Details

This class inherits a constructor from Reform::Form::Populator

Instance Method Details

#call!(options) ⇒ Object



95
96
97
98
# File 'lib/reform/form/populator.rb', line 95

def call!(options)
  return options[:model][options[:index]] if options[:binding].array?
  options[:model]
end