Module: Bh::PanelHelper
- Includes:
- BaseHelper
- Included in:
- Form::FieldsetHelper, PanelRowHelper
- Defined in:
- lib/bh/helpers/panel_helper.rb
Overview
Provides methods to include panels.
Instance Method Summary collapse
-
#panel(content_or_options_with_block = nil, options = nil, &block) ⇒ String
Returns an HTML block tag that follows the Bootstrap documentation on how to display panels.
Instance Method Details
#panel(content_or_options_with_block = nil, options = nil, &block) ⇒ String
Returns an HTML block tag that follows the Bootstrap documentation on how to display panels.
The content of the panel 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).
39 40 41 42 43 44 45 46 47 |
# File 'lib/bh/helpers/panel_helper.rb', line 39 def panel( = nil, = nil, &block) if block_given? panel_string capture(&block), || {} elsif .is_a?(Hash) && .nil? panel_string nil, else panel_string , || {} end end |