techiferous/tabulous — pull request #7 by eploko (2012-01-09 13:52:35+00:00)
Title: Feature: Display tabs even if no active tab is present

The previous behavior was not to render the tabs at all if there was no tab defined for the current controller-action pair. I've stumbled on this in my current project where the tabs don't cover all of the possible controllers. Some of the controllers are reached from a drop-down in the navigation bar and there are no tabs for them. This led to the fact that as soon as the user clicked on a link in the drop-down and happened to be on a page for a controller not covered by the tabs, all of the navigation for the rest of the site (effectively rendered as tabs) was gone. Oops.

I've added an option to the Options class to augment the rendering behavior (render_tabs_if_no_tab_found) and changed the Tabulous class to treat it well.

By default, when an action renders and no tab is defined for that action, the tabs are simply not rendered. If you turn this on, the tabs are still rendered, though no tab will be active.