Ruby On How to DRY this up

by idlefingers, July 25, 2008 14:17

Thanks! That's much nicer.

2b404bb55d9b5dc78841795c4b731771 Talk
1
2
3
4
def tab(name, options = {})
  if name == controller.controller_name.humanize || root_of_path.humanize == name
    content_tag :li, link_to("<span>#{name}</span>", options), :class => "active"
...

Ruby How to DRY this up

by idlefingers, July 25, 2008 13:30, 8 refactorings, tagged with rails, tabs

This is for a tabbed naviga...

2b404bb55d9b5dc78841795c4b731771 Talk