diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2006-12-04 00:12:00 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2006-12-04 00:12:00 +0000 |
commit | 2794f4164fcdba2cfc704851918c6c869215c045 (patch) | |
tree | 6a6e00c3b98813c42f21b8f5b03e37e4a31f28b0 /actionpack/lib | |
parent | abe8fa73a91b72e79717673393a4f5bc5cd341f7 (diff) | |
download | rails-2794f4164fcdba2cfc704851918c6c869215c045.tar.gz rails-2794f4164fcdba2cfc704851918c6c869215c045.tar.bz2 rails-2794f4164fcdba2cfc704851918c6c869215c045.zip |
Dropped the idea of automatically routing :format for the vanilla routes -- that will be a treat for map.resources. Deprecated the name route root as it'll be used as a shortcut for map.connect '' in Rails 2.0 (Rails 1.2). Added map.root as an alias for map.connect '' (Rails 2.0)
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5671 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/lib')
-rw-r--r-- | actionpack/lib/action_controller/routing.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/actionpack/lib/action_controller/routing.rb b/actionpack/lib/action_controller/routing.rb index 2fe74c5b34..b0d0dbcf57 100644 --- a/actionpack/lib/action_controller/routing.rb +++ b/actionpack/lib/action_controller/routing.rb @@ -975,6 +975,11 @@ module ActionController @set.add_route(path, options) end + # Creates a named route called "root" for matching the root level request. + def root(options = {}) + named_route("root", '', options) + end + def named_route(name, path, options = {}) @set.add_named_route(name, path, options) end |