Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Document the :path option for resources :posts

  • Loading branch information...
commit 38246b3a1a18a62c9ede81cf9641081e4c189489 1 parent 2b13f84
@radar radar authored fxn committed
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!
Please sign in to comment.
Something went wrong with that request. Please try again.