aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack
diff options
context:
space:
mode:
authorKevin Moore <kevin@thinkpixellab.com>2011-12-28 10:59:28 -0800
committerKevin Moore <kevin@thinkpixellab.com>2011-12-28 10:59:28 -0800
commita7d3851bdbc030e1eb14b66fd72ad602b6d4348c (patch)
treec9674ffbc35ed9c62d5f3c0f7bcedaf16ff43992 /actionpack
parent4cd7c4e8cef756412cb088b959569c06ba25817b (diff)
downloadrails-a7d3851bdbc030e1eb14b66fd72ad602b6d4348c.tar.gz
rails-a7d3851bdbc030e1eb14b66fd72ad602b6d4348c.tar.bz2
rails-a7d3851bdbc030e1eb14b66fd72ad602b6d4348c.zip
Documented about using :path option for resources
Diffstat (limited to 'actionpack')
-rw-r--r--actionpack/lib/action_dispatch/routing/mapper.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/actionpack/lib/action_dispatch/routing/mapper.rb b/actionpack/lib/action_dispatch/routing/mapper.rb
index 2117cb76b5..84f544c546 100644
--- a/actionpack/lib/action_dispatch/routing/mapper.rb
+++ b/actionpack/lib/action_dispatch/routing/mapper.rb
@@ -1053,6 +1053,13 @@ module ActionDispatch
#
# The above example will now change /posts/new to /posts/brand_new
#
+ # [:path]
+ # Allows you to change the path prefix for the resource.
+ #
+ # resources :posts, :path => 'postings'
+ #
+ # The resource and all segments will now route to /postings instead of /posts
+ #
# [:only]
# Only generate routes for the given actions.
#