Module: Bh::ButtonHelper
- Includes:
- BaseHelper
- Defined in:
- lib/bh/helpers/button_helper.rb
Overview
Provides methods to include buttons.
Instance Method Summary collapse
-
#button(content_or_options_with_block = nil, options = nil, &block) ⇒ String
Returns an HTML block tag that follows the Bootstrap documentation on how to display buttons.
Instance Method Details
#button(content_or_options_with_block = nil, options = nil, &block) ⇒ String
Returns an HTML block tag that follows the Bootstrap documentation on how to display buttons.
The content of the button can either be passed as the first parameter (in which case, the options are the second parameter), or as a block (in which case, the options are the first paramter).
32 33 34 35 36 37 38 |
# File 'lib/bh/helpers/button_helper.rb', line 32 def ( = nil, = nil, &block) if block_given? capture(&block), || {} else , || {} end end |