Files

SimpleForm::ActionViewExtensions::FormHelper

This modules create simple form wrappers around default form_for, fields_for and remote_form_for.

Example:

simple_form_for @user do |f|
  f.input :name, :hint => 'My hint'
end

Constants

FIELD_ERROR_PROC

Override the default ActiveRecordHelper behaviour of wrapping the input. This gets taken care of semantically by adding an error class to the wrapper tag containing the input.

Public Instance Methods

with_custom_field_error_proc(&block) click to toggle source
# File lib/simple_form/action_view_extensions/form_helper.rb, line 25
def with_custom_field_error_proc(&block)
  @@default_field_error_proc = ::ActionView::Base.field_error_proc
  ::ActionView::Base.field_error_proc = FIELD_ERROR_PROC
  result = yield
  ::ActionView::Base.field_error_proc = @@default_field_error_proc
  result
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.