Module: TabMenu::ViewHelpers

Includes:
ActionView::Helpers::CaptureHelper, ActionView::Helpers::TagHelper, ActionView::Helpers::UrlHelper
Defined in:
lib/tab_menu/view_helpers.rb

Instance Method Summary collapse

Instance Method Details

#tab_menu(tab_name = "", html_options = {}, options = {}, &block) ⇒ Object



9
10
11
12
13
14
15
# File 'lib/tab_menu/view_helpers.rb', line 9

def tab_menu(tab_name = "", html_options = {}, options = {}, &block)
  html_options[:class] ||= tab_name.blank? ? nil : tab_name
  
  (:ul, html_options) do
    yield(TabBuilder.new(self, options[:current_tab]))
  end
end