Module: Bh::ButtonToHelper

Includes:
BaseHelper
Defined in:
lib/bh/helpers/button_to_helper.rb

Instance Method Summary collapse

Instance Method Details

#button_to(*args, &block) ⇒ Object

Overrides ActionView +button_to+ to be able to add the 'btn' class to the link (or 'navbar-btn' if inside a navbar).



11
12
13
14
15
16
17
# File 'lib/bh/helpers/button_to_helper.rb', line 11

def button_to(*args, &block)
  args = append_class_as! :class, 'btn', *args, &block
  if @navbar_id
    args = append_class_as! :form_class, 'navbar-form', *args, &block
  end
  super *args, &block
end