styles for tabnav plugin

I modified the 'def tabnav tabnav_sym method' from tabnav's
application_helper_extension.rb to check the tabnav_sym to determine
the object being rendered. Based on that information, I select the
partial to use for the rendering. I do a bit of code in the
application.rhtml layout using @first_render or getting the controller
name directly to select the tabnav to display and pass that to the
start tabnav tag.

I now have two partials (two nested tab styles) that replace what
would have been over 15 tabnav partials for my application. I don't
know if this will work with the newer versions, but it solved my

Example with a nested tabnav:


<%= render_partial 'common/header' -%>

<%= start_tabnav :main -%>
    case @first_render
        when /^admin/
            tabnav_set = :admin
        when /^home/
            tabnav_set = :home
    end %>
    <%= start_tabnav tabnav_set -%>
    <!-- start content -->
    <%= yield -%>
    <%= end_tabnav -%>
    <!-- end content -->
<%= end_tabnav -%>

<%= render_partial 'common/footer' -%>

tabnav application_helper.rb:

  # Selects the correct template to use for rendering the selected
  # tabnav object.
  def tabnav tabnav_sym
    # Set the name of the template
    if tabnav_sym.id2name == 'main'
      tabnav_template = 'main'
      tabnav_template = 'secondary'

    # Render the tabnav partial
    result = capture do
      render :partial => "tabnav/#{tabnav_template}_tabnav",
             :locals => { :tabs => tabnav_sym.to_tabnav.tabs }