Permalink
Browse files

Documented about using :path option for resources

  • Loading branch information...
1 parent 4cd7c4e commit a7d3851bdbc030e1eb14b66fd72ad602b6d4348c @kevmoo kevmoo committed Dec 28, 2011
Showing with 7 additions and 0 deletions.
  1. +7 −0 actionpack/lib/action_dispatch/routing/mapper.rb
View
7 actionpack/lib/action_dispatch/routing/mapper.rb
@@ -1053,6 +1053,13 @@ def resource(*resources, &block)
#
# 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.
#

0 comments on commit a7d3851

Please sign in to comment.