Module: Railsstrap::Form::FieldHelper

Includes:
BaseHelper
Defined in:
lib/railsstrap/core_ext/rails/form/field_helper.rb

Instance Method Summary collapse

Methods included from Helpers

#alert_box, #aside, #badge, #bootstrap_css, #bootstrap_flash, #bootstrap_js, #bootstrap_theme_css, #button, #button_group, #button_to, #card, #card_group, #cdn, #dropdown, #errors_for, #font_awesome_css, #font_awesome_js, #glyphicon, #horizontal, #icon, #jquery_js, #link_to, #modal, #nav, #navbar, #popper_js, #progress_bar, #render_breadcrumbs, #vertical

Instance Method Details

#field(method, field_type, options = {}, &block) ⇒ Object



8
9
10
11
12
# File 'lib/railsstrap/core_ext/rails/form/field_helper.rb', line 8

def field(method, field_type, options = {}, &block)
  options[:placeholder] ||= strip_tags(label method)
  append_class! options, 'form-control'
  base_field method, field_type, options, &block
end