Module: TabsHelper

Defined in:
app/helpers/tabs_helper.rb

Instance Method Summary collapse

Instance Method Details



3
4
5
6
7
# File 'app/helpers/tabs_helper.rb', line 3

def tab_link_to(model_or_name, link, current=nil)
  model_or_name = model_or_name.model_name.human(:count => 2).capitalize if Class === model_or_name
  current ||= request.path.start_with?(link)
  link_to model_or_name, link, :class => ("current" if current)
end