diff options
Diffstat (limited to 'actionpack/lib/action_controller/routing.rb')
-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 |