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



85
86
87
88
# File 'lib/reform/form/populator.rb', line 85

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