Module: LogicalTabs::Helper
- Defined in:
- lib/logical_tabs/helper.rb
Instance Method Summary collapse
- #tabbed_panel(options = {}, &block) ⇒ Object (also: #create_tabbed_panel)
- #wrap_in_div(id, &block) ⇒ Object
Instance Method Details
#tabbed_panel(options = {}, &block) ⇒ Object Also known as: create_tabbed_panel
5 6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/logical_tabs/helper.rb', line 5 def tabbed_panel( = {}, &block) @panel_count = defined?(@panel_count) ? @panel_count + 1 : 0 .merge!({:seq => @panel_count}) unless [:base_id] tabbed_panel = TabbedPanel.new(self, ) if block_given? yield(tabbed_panel) output = tabbed_panel.render output end return output end |
#wrap_in_div(id, &block) ⇒ Object
20 21 22 |
# File 'lib/logical_tabs/helper.rb', line 20 def wrap_in_div(id, &block) content_tag(:div, capture(&block), :class => 'wrapper', :id => id) end |