Module: BootstrapFormHelper

Includes:
ActionView::Helpers, PanelHelper
Included in:
ActionView::Helpers::FormBuilder
Defined in:
app/helpers/bootstrap_form_helper.rb

Constant Summary collapse

FIELD_HELPERS =
[:email_field, :password_field, :text_field, :text_area,
:search_field, :telephone_field, :url_field, :number_field,
:file_field, :date_field, :time_field, :month_field,
:week_field, :datetime_field]

Instance Method Summary collapse

Methods included from PanelHelper

#panel

Instance Method Details

#form_for(record, options = {}, &block) ⇒ Object



11
12
13
14
15
16
17
18
# File 'app/helpers/bootstrap_form_helper.rb', line 11

def form_for(record, options = {}, &block)
  html_options = options[:html] ||= {}

  prepend_class(html_options, get_form_layout(options.delete(:layout)))
  options[:html] = html_options

  super
end