Permalink
Browse files

Add documentation for :path_names option on resources

  • Loading branch information...
radar authored and fxn committed Nov 13, 2010
1 parent 43b0fd7 commit ccc8d9ce54735e5ad29b354bb8b4ec97a6ce827a
Showing with 8 additions and 0 deletions.
  1. +8 −0 actionpack/lib/action_dispatch/routing/mapper.rb
@@ -878,6 +878,14 @@ def resource(*resources, &block)
# GET /photos/:id/edit
# PUT /photos/:id
# DELETE /photos/:id
+ # === Supported options
+ # [:path_names]
+ # Allows you to change the paths of the seven default actions.
+ # Paths not specified are not changed.
+ #
+ # resources :posts, :path_names => { :new => "brand_new" }
+ #
+ # The above example will now change /posts/new to /posts/brand_new
def resources(*resources, &block)
options = resources.extract_options!

0 comments on commit ccc8d9c

Please sign in to comment.