Module: RailsBootstrapHelpers::Helpers::FormTagHelper

Defined in:
lib/rails-bootstrap-helpers/helpers/form_tag_helper.rb

Instance Method Summary collapse

Instance Method Details

#bs_button_tag(value, type, options = {}) ⇒ Object

Renders a Bootstrap button tag. This method behaves just as button_tag but will render a Bootstrap styled button tag instead.

Options

Parameters:

  • :style (String, Symbol)

    the style of the button

  • :size ("large", "small", "mini")

    the size of the button

  • :disabled (Boolean)

    if the button should be disabled or not

  • :icon (String)

    the name of an icon to render on the button

  • :icon_position ("left", "right")

    the post of the icon, if present

  • :icon_invert (Boolean)

    if the color of the icon should be inverted



18
19
20
21
# File 'lib/rails-bootstrap-helpers/helpers/form_tag_helper.rb', line 18

def bs_button_tag (value, type, options = {})
  options = options.merge type: type
  RailsBootstrapHelpers::Renderers::ButtonRenderer.new(self, :button, value, options).render
end