blob: 3883f46834074f9bb651cf31390ef65f18a7c8d7 (
plain)
| 1
2
3
4
5
6
7
8
9
 | module TabsHelper
  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
end
 |