Module: ButtonToHelper
- Includes:
- FormatHelper
- Defined in:
- app/helpers/button_to_helper.rb
Instance Method Summary collapse
Methods included from FormatHelper
#prepend_class, #squeeze_n_strip
Instance Method Details
#button_to(name = nil, options = nil, html_options = nil, &block) ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 16 |
# File 'app/helpers/button_to_helper.rb', line 4 def (name = nil, = nil, = nil, &block) , = , name if block_given? ||= {} ||= {} layout = 'btn-block' if .delete(:layout).try(:to_sym) == :block size = get_btn_size(.delete(:size)) style = get_btn_type(.delete(:style)) prepend_class(, 'btn', style, layout, size) super(name, , , &block) end |