Add documentation for :path_names option on resources

This commit is contained in:
Ryan Bigg
2010-11-13 11:16:32 +08:00
parent 95f41fe12e
commit fe8446fcce

View File

@@ -911,6 +911,14 @@ module ActionDispatch
# 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!