<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1,2 +1,7 @@
+require 'navigation'
+
 ActionView::Base.send :include, RPH::Navigation::InstanceMethods
-ActionController::Base.send :extend, RPH::Navigation::ClassMethods
\ No newline at end of file
+ActionController::Base.class_eval do
+  extend RPH::Navigation::ClassMethods
+  class_inheritable_accessor :_current_tab
+end
\ No newline at end of file</diff>
      <filename>init.rb</filename>
    </modified>
    <modified>
      <diff>@@ -16,7 +16,7 @@ end
 module RPH
   module Navigation
     SUBTITLES = {}
-	
+    
     # InstanceMethods will be mixed in with ActionView::Base which will
     # make the navigation helper available to any view
     module InstanceMethods
@@ -41,45 +41,44 @@ module RPH
       #   Note - requires the &lt;tt&gt;authorize&lt;/tt&gt; option to work)
       # * +hover_text+ - specifies to use the subtitles as hovertext instead of showing up as span's under the links
       def navigation(sections, options={})
-        navigation, items = Navigation.new(sections, options), []
+        navigation, items = Navigator.new(sections, options), []
 
         navigation.sections.each do |link|
-          current_tab = controller.class.instance_variable_get(&quot;@current_tab&quot;) || controller.controller_name.to_sym
-          css = 'current' if link == current_tab
-        
+          css = 'current' if link == controller.class.current_tab
+          
           if navigation.methods_to_authorize.include?(link)
             items &lt;&lt; content_tag(:li, construct(navigation, link), :class =&gt; [css.to_s, navigation.authorized_css.to_s].compact.join(' ')) if allowed?(navigation)
           else
             items &lt;&lt; content_tag(:li, construct(navigation, link), :class =&gt; css.to_s)
           end
         end
-      
+        
         return '' if items.blank?
         content_tag(:ul, items, :class =&gt; 'nav_bar')
       end
-		
+
       private
-        # builds the actual link and determines if subtitles are present
-        def construct(nav, section)
-          text = nav.text_for(section)
-          link = link_to(text, send(&quot;#{section.to_s.downcase}_path&quot;))
-        
-          if nav.wants_hover_text?
-            link = link_to(text, send(&quot;#{section.to_s.downcase}_path&quot;), :title =&gt; SUBTITLES[section])
-          elsif nav.wants_subtitles?
-            link += content_tag(:span, SUBTITLES[section])
-          end
-  			
-          link
+      # builds the actual link and determines if subtitles are present
+      def construct(nav, section)
+        text = nav.text_for(section)
+        link = link_to(text, send(&quot;#{section.to_s.downcase}_path&quot;))
+
+        if nav.wants_hover_text?
+          link = link_to(text, send(&quot;#{section.to_s.downcase}_path&quot;), :title =&gt; SUBTITLES[section])
+        elsif nav.wants_subtitles?
+          link += content_tag(:span, SUBTITLES[section])
         end
-  		
-        # checks if the authorization method exists, and then checks
-        # the boolean value it returns
-        def allowed?(navigation)
-          controller.respond_to?(navigation.authorization_method) &amp;&amp; controller.send(navigation.authorization_method)
-        end 
+
+        link
+      end
+
+      # checks if the authorization method exists;
+      # then checks the boolean value it returns
+      def allowed?(navigation)
+        controller.respond_to?(navigation.authorization_method) &amp;&amp; controller.send(navigation.authorization_method)
+      end 
     end
-	
+
     # ClassMethods will be extended by ActionController::Base which will
     # make the current_tab method available to any controller inhereting 
     # from ActionController::Base
@@ -90,9 +89,9 @@ module RPH
       #   class PublicController &lt; ApplicationController
       #     current_tab :home
       #   end
-      def current_tab(tab=nil)
-        @current_tab = tab unless tab.nil?
-        @current_tab ||= controller.controller_name.to_sym
+      def current_tab(tab=nil)        
+        self._current_tab = tab if tab
+        self._current_tab ||= self.to_s.sub('Controller', '').downcase.to_sym
       end
     end
   end</diff>
      <filename>lib/navigation.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>116d7ccbaac38c93f67a7b47d73a5ebba6710c3c</id>
    </parent>
  </parents>
  <author>
    <name>rpheath</name>
    <email>rpheath@gmail.com</email>
  </author>
  <url>http://github.com/rpheath/navigation_helper/commit/ef2294750251cdca156c7757e4d1bc57700e2c3f</url>
  <id>ef2294750251cdca156c7757e4d1bc57700e2c3f</id>
  <committed-date>2008-10-27T06:45:35-07:00</committed-date>
  <authored-date>2008-10-27T06:45:35-07:00</authored-date>
  <message>now supports setting tabs through inheritance</message>
  <tree>b9983829ca5626c40a72a810e17c742789ac706f</tree>
  <committer>
    <name>rpheath</name>
    <email>rpheath@gmail.com</email>
  </committer>
</commit>
