Skip to content
Browse files

Documented about using :path option for resources

  • Loading branch information...
1 parent 5f57d2a commit 2e533e3435f6c7e3cd7503b7f997344edd39f1c7 @kevmoo kevmoo committed with vijaydev 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 2e533e3

Please sign in to comment.
Something went wrong with that request. Please try again.