weppos/tabs_on_rails — Issue #15: Error description in readme - "Creating a custom Builder"
Author: liuqiang
Created: 2012-01-03 12:30:23+00:00
State: open

class MenuTabBuilder < TabsOnRails::Tabs::Builder
def tab_for(tab, name, options, item_options = {})
item_options[:class] = (current_tab?(tab) ? 'active' : '')
@context.content_tag(:li, item_options) do
@context.link_to(name, options)
end
end
end

the correct builder is 'TabsOnRails::Tabs::TabsBuilder' not class MenuTabBuilder < TabsOnRails::Tabs::Builder, or else it has no