From 6e165b894051a23c2818cb8d21dd74de8d41c622 Mon Sep 17 00:00:00 2001 From: Michael Koziarski Date: Sat, 26 Jan 2008 08:41:19 +0000 Subject: Make it simpler to make the root route an alias for another route. Closes #10818 [bscofield] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8738 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionpack/lib/action_controller/routing.rb | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'actionpack/lib/action_controller/routing.rb') diff --git a/actionpack/lib/action_controller/routing.rb b/actionpack/lib/action_controller/routing.rb index d93dc5205f..70745f9d27 100644 --- a/actionpack/lib/action_controller/routing.rb +++ b/actionpack/lib/action_controller/routing.rb @@ -115,6 +115,12 @@ module ActionController # root_url # => 'http://www.example.com/' # root_path # => '' # + # You can also specify an already-defined named route in your map.root call: + # + # # In routes.rb + # map.new_session :controller => 'sessions', :action => 'new' + # map.root :new_session + # # Note: when using +with_options+, the route is simply named after the # method you call on the block parameter rather than map. # -- cgit v1.2.3