Top Level Namespace

Defined Under Namespace

Modules: Kernel, Lev Classes: Object

Instance Method Summary collapse

Instance Method Details

#handler_errorsObject



1
2
3
# File 'lib/lev/handler_helper.rb', line 1

def handler_errors
  @errors || (@handler_result ? @handler_result.errors : Lev::Errors.new)
end

#lev_form_for(record_or_name_or_array, *args, &proc) ⇒ Object



60
61
62
63
64
65
# File 'lib/lev/form_builder.rb', line 60

def lev_form_for(record_or_name_or_array, *args, &proc)
  options = args.extract_options!
  options[:params] = params
  options[:errors] = handler_errors # @errors || (@handler_outcome ? @handler_outcome.errors : [])
  form_for(record_or_name_or_array, *(args << options.merge(:builder => Lev::FormBuilder)), &proc)
end