For the ruby on rails plugin / gem, tabs_on_rails, the active tab is usually i span, but i needed it to be a clickable link, and for that i needed a class to show the user that this tab is open.
without further ado, and since there don’t seem to be updates on tabs_on_rails, i installed the plugin (instead of the gem, which wasn’t working anyways) and wrenched tabs_builder.rb to look like this:
def tab_for(tab, name, options) linkclass = current_tab?(tab) ? "currenttab" : nil @context.content_tag(:li, @context.link_to(name, options), :class => linkclass) #content = @context.link_to_unless(current_tab?(tab), name, options) do # @context.content_tag(:span, name) #end #@context.content_tag(:li, content) end
works like a charm :-P