<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>lib/default_routing/default_resource.rb</filename>
    </added>
    <added>
      <filename>lib/default_routing/overrides.rb</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -6,15 +6,19 @@ a path segment added to their url.
 
 When combined with acts_as_url_param (or some other pretty url plugin), this results in nice tight urls without any extra folders in them in the cases where you can safely get away with it.
 
-It's important to note that using a default nesting results in a url collision that hides the index action of the nested resource. This is usually fine, because the show action of the parent resource can and should acts as the index page, and in some cases is desirable so that you don't have to remember which named route to use.
+This plugin adds new new routing options:
+* :default - When true, causes the resource to not generate a namespace prefix
+* :show - a symbol identifying a nested resource whose index action should *replace* this resources show action.
+
+It's important to note that using a :default nesting results in a url collision that hides the index action of the nested resource. If routing to the index action is more desirable, use the :show option instead.
 
 Example
 =======
 
 map.namespace :forum do |forum|
-  forum.resources :boards, :default =&gt; true do |boards|
-    boards.resources :threads, :default =&gt; true do |threads|
-      threads.resources :posts, :default =&gt; true
+  forum.resources :boards, :default =&gt; true, :show =&gt; :threads do |boards|
+    boards.resources :threads, :show =&gt; posts do |threads|
+      threads.resources :posts
     end
   end
 end
@@ -25,23 +29,23 @@ end
                              POST   /forum
              new_forum_board GET    /forum/new
             edit_forum_board GET    /forum/:id/edit
-                 forum_board GET    /forum/:id      &lt;&lt; prevents recognition of forum_board_threads
                              PUT    /forum/:id
                              DELETE /forum/:id
-         forum_board_threads GET    /forum/:board_id
+         forum_board_threads GET    /forum/:board_id             # prevents recognition of forum_board
                              POST   /forum/:board_id
       new_forum_board_thread GET    /forum/:board_id/new
      edit_forum_board_thread GET    /forum/:board_id/:id/edit
-          forum_board_thread GET    /forum/:board_id/:id      &lt;&lt; prevents recognition of forum_board_thread_posts
                              PUT    /forum/:board_id/:id
                              DELETE /forum/:board_id/:id
-    forum_board_thread_posts GET    /forum/:board_id/:thread_id
+    forum_board_thread_posts GET    /forum/:board_id/:thread_id  # prevents recognition of forum_board_thread
                              POST   /forum/:board_id/:thread_id
  new_forum_board_thread_post GET    /forum/:board_id/:thread_id/new
 edit_forum_board_thread_post GET    /forum/:board_id/:thread_id/:id/edit
      forum_board_thread_post GET    /forum/:board_id/:thread_id/:id
                              PUT    /forum/:board_id/:thread_id/:id
                              DELETE /forum/:board_id/:thread_id/:id
+          forum_board_thread GET    /forum/:board_id/:id
+                 forum_board GET    /forum/:id
 
 % script/console
 &gt;&gt; app.forum_board_thread_post_path(Board.first, Thread.first, Post.first)</diff>
      <filename>README</filename>
    </modified>
    <modified>
      <diff>@@ -1,2 +1,2 @@
 require 'default_routing'
-ActionController::Resources::Resource.send(:include, DefaultRouting)
\ No newline at end of file
+ActionController::Resources::Resource.send(:include, DefaultRouting::DefaultResource)</diff>
      <filename>init.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,25 +1,3 @@
-# DefaultRouting
-module DefaultRouting
+require 'default_routing/default_resource'
+require 'default_routing/overrides'
 
-  def self.included(base)
-    return if base.included_modules.include?(InstanceMethods)
-    base.send(:include, InstanceMethods)
-    base.alias_method_chain :initialize, :default_routing
-    base.alias_method_chain :path, :default_routing
-  end
-
-  module InstanceMethods
-
-    def initialize_with_default_routing(entities, options)
-      default = options.delete(:default)
-      initialize_without_default_routing(entities, options)
-      @path_segment = nil if default
-    end
-
-    def path_with_default_routing
-      @path ||= &quot;#{path_prefix}#{'/' if @path_segment}#{@path_segment}&quot;      
-    end
-
-  end
-
-end
\ No newline at end of file</diff>
      <filename>lib/default_routing.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>2b767cb106892582a1023df1812be5147df75a71</id>
    </parent>
  </parents>
  <author>
    <name>Chris Eppstein</name>
    <email>chris@eppsteins.net</email>
  </author>
  <url>http://github.com/caring/default_routing/commit/9aa485807130206e0074c78037013d40d622f6bc</url>
  <id>9aa485807130206e0074c78037013d40d622f6bc</id>
  <committed-date>2008-06-16T08:14:21-07:00</committed-date>
  <authored-date>2008-06-16T07:59:46-07:00</authored-date>
  <message>This commit allows the index action of the nested resource to take priority over the
show member action of the nesting resource. This is much more natural as the index
is usually more semantically meaninful than the show where these routes collide.

The show route is still generated, but at a lower priority, so that the named route
can be used even though it will be recognized as the nested resource's index action.

Example usage:
map.resources :threads, :show =&gt; :posts, do |threads|
	threads.resources :posts
end</message>
  <tree>b3a53a7a91529f78d58f0020b81b829aff36aa5e</tree>
  <committer>
    <name>Chris Eppstein</name>
    <email>chris@eppsteins.net</email>
  </committer>
</commit>
