Browse files

Document the :path option for resources :posts

  • Loading branch information...
1 parent 2b13f84 commit 38246b3a1a18a62c9ede81cf9641081e4c189489 @radar radar committed with fxn Nov 24, 2010
Showing with 8 additions and 0 deletions.
  1. +8 −0 actionpack/lib/action_dispatch/routing/mapper.rb
View
8 actionpack/lib/action_dispatch/routing/mapper.rb
@@ -949,6 +949,14 @@ def resource(*resources, &block)
# resources :posts, :module => "admin"
#
# All requests to the posts resources will now go to +Admin::PostsController+.
+ #
+ # [:path]
+ #
+ # Set a path prefix for this resource.
+ #
+ # resources :posts, :path => "admin"
+ #
+ # All actions for this resource will now be at +/admin/posts+.
def resources(*resources, &block)
options = resources.extract_options!

0 comments on commit 38246b3

Please sign in to comment.