aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack
diff options
context:
space:
mode:
authorRyan Bigg <radarlistener@gmail.com>2010-11-13 11:16:32 +0800
committerRyan Bigg <radarlistener@gmail.com>2010-11-13 11:16:32 +0800
commitfe8446fcced912730b068944b2ce152f18046f77 (patch)
treed93cbee7ad7caf4eed99e495aceac64560fc3b8e /actionpack
parent95f41fe12e7680459351be633a171abf26beac1a (diff)
downloadrails-fe8446fcced912730b068944b2ce152f18046f77.tar.gz
rails-fe8446fcced912730b068944b2ce152f18046f77.tar.bz2
rails-fe8446fcced912730b068944b2ce152f18046f77.zip
Add documentation for :path_names option on resources
Diffstat (limited to 'actionpack')
-rw-r--r--actionpack/lib/action_dispatch/routing/mapper.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/actionpack/lib/action_dispatch/routing/mapper.rb b/actionpack/lib/action_dispatch/routing/mapper.rb
index cc013ac072..8b5d7d307b 100644
--- a/actionpack/lib/action_dispatch/routing/mapper.rb
+++ b/actionpack/lib/action_dispatch/routing/mapper.rb
@@ -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!