<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -15,7 +15,7 @@ end
 # see the README for more details and a full list of example usage
 module RPH
   module Navigation
-    SUBTITLES = {}
+    SUBTITLES, ROUTES = {}, {}
     
     # InstanceMethods will be mixed in with ActionView::Base which will
     # make the navigation helper available to any view
@@ -54,20 +54,18 @@ module RPH
         end
         
         return '' if items.blank?
-        content_tag(:ul, items, :class =&gt; 'nav_bar')
+        content_tag(:ul, items, :class =&gt; 'navigation')
       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;))
+        path = ROUTES[section.to_sym] || send(&quot;#{section.to_s.downcase}_path&quot;)
+        link = link_to(text, path)
 
-        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 = link_to(text, path, :title =&gt; SUBTITLES[section]) if nav.wants_hover_text?
+        link += content_tag(:span, SUBTITLES[section]) if nav.wants_subtitles?
 
         link
       end</diff>
      <filename>lib/navigation.rb</filename>
    </modified>
    <modified>
      <diff>@@ -8,21 +8,44 @@ module RPH
       include Error
       
       def initialize(sections, options)
-        @sections = sections
-        @options = options
+        @sections, @options = sections, options
+
         validate_sections!
-        fill_subtitles if has_subtitles?
+        update_routes! if has_custom_routes?
+        fill_subtitles! if has_subtitles?
       end
       
     private      
       # loads the SUBTITLES constant with key/value relationships for section/subtitle
-      def fill_subtitles
+      def fill_subtitles!
         @sections.in_groups_of(2) { |group| SUBTITLES[group.first] = group.last }
       end
-	
-      # assumed that if all items are symbols, subtitles are not present
+	    
+      # assumes that if any of the items are strings, subtitles are present
       def has_subtitles?
-        !@sections.all? { |section| section.is_a?(Symbol) }
+        @sections.any? { |section| section.is_a?(String) }
+      end
+      
+      # updates the ROUTES hash with the user-defined route
+      def update_routes!
+        @sections.each_with_index do |section, index|
+          next unless section.is_a?(Hash)
+          
+          # make sense of the key/value pair
+          tab, route = section.keys.first, section.values.first
+          
+          # set the custom route
+          ROUTES[tab] = route
+          
+          # ensure that @sections doesn't gets rid of that hash
+          # (we don't need it anymore)
+          @sections[index] = tab
+        end
+      end
+      
+      # assumes that if any item is a Hash, it must have a custom route
+      def has_custom_routes?
+        @sections.any? { |section| section.is_a?(Hash) }
       end
 			
       def requires_authorization?
@@ -49,11 +72,11 @@ module RPH
 	  protected
 	    # distinguishes between sections and subtitles, returning sections
       def parse(sections)
-        temp = []
-        sections.each_with_index do |section, index|
-          temp &lt;&lt; section if section.is_a?(Symbol) &amp;&amp; index.even?
+        returning(temp = []) do
+          sections.each_with_index do |section, index|
+            temp &lt;&lt; section if section.is_a?(Symbol) &amp;&amp; index.even?
+          end
         end
-        temp
       end
   
       # ensures that the links passed in are valid</diff>
      <filename>lib/navigation/navigator.rb</filename>
    </modified>
    <modified>
      <diff>@@ -13,11 +13,16 @@ describe &quot;NavigationHelper Plugin: Navigator class&quot; do
     def nav_with_subtitles(options={})
       N.new(@subtitle_links, options)
     end
+    
+    def nav_with_custom_routes(options={})
+      N.new(@custom_route_links, options)
+    end
   end
       
   before(:each) do
     @links = [:one, :two, :three]
     @subtitle_links = [:one, 'one', :two, 'two', :three, 'three']
+    @custom_route_links = [{:one =&gt; '/some/where'}, :two, :three]
   end
   
   describe &quot;errors&quot; do
@@ -53,10 +58,11 @@ describe &quot;NavigationHelper Plugin: Navigator class&quot; do
     before(:each) do
       @navigation = nav_without_subtitles
       @subtitle_navigation = nav_with_subtitles
+      @custom_route_navigation = nav_with_custom_routes
     end
     
     it &quot;should be an instance of NavigationHelper::Navigation&quot; do
-      [@navigation, @subtitle_navigation].each do |nav|
+      [@navigation, @subtitle_navigation, @custom_route_navigation].each do |nav|
         nav.should be_an_instance_of(N)
       end
     end</diff>
      <filename>spec/navigation_helper_spec.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>f334d7440995fbb9ce5ffbfd131e6f3feba2ca04</id>
    </parent>
  </parents>
  <author>
    <name>rpheath</name>
    <email>rpheath@gmail.com</email>
  </author>
  <url>http://github.com/rpheath/navigation_helper/commit/e881967fb6fc0bf68efb4ec0c7ced1b20e3206d9</url>
  <id>e881967fb6fc0bf68efb4ec0c7ced1b20e3206d9</id>
  <committed-date>2008-12-03T08:45:58-08:00</committed-date>
  <authored-date>2008-12-03T08:45:58-08:00</authored-date>
  <message>added ability to set custom routes</message>
  <tree>2247c8406cf321b97c897ee629b5159ac3a38d10</tree>
  <committer>
    <name>rpheath</name>
    <email>rpheath@gmail.com</email>
  </committer>
</commit>
