Permalink
Browse files

Document the :path option for resources :posts

  • Loading branch information...
1 parent 01af50d commit fd47a4bf438e37a20756e0341cd7cd4e472fd3cb @radar radar committed Nov 23, 2010
Showing with 8 additions and 0 deletions.
  1. +8 −0 actionpack/lib/action_dispatch/routing/mapper.rb
@@ -983,6 +983,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 fd47a4b

Please sign in to comment.