aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack
diff options
context:
space:
mode:
authorLukasz Sarnacki <luke.sarnacki@gmail.com>2012-03-27 00:15:58 +0200
committerLukasz Sarnacki <luke.sarnacki@gmail.com>2012-03-27 00:22:28 +0200
commit0c5ca0747f8bf0f24539be54bdb8dace9424c073 (patch)
tree00d025df7be3f2b08b747108546111274b9b27b5 /actionpack
parentfc25feb341e0ae0cd0c634ccc57446feab18565c (diff)
downloadrails-0c5ca0747f8bf0f24539be54bdb8dace9424c073.tar.gz
rails-0c5ca0747f8bf0f24539be54bdb8dace9424c073.tar.bz2
rails-0c5ca0747f8bf0f24539be54bdb8dace9424c073.zip
added shallow_prefix option description in documantation
It is in response for confusion in issue #5301
Diffstat (limited to 'actionpack')
-rw-r--r--actionpack/lib/action_dispatch/routing/mapper.rb19
1 files changed, 19 insertions, 0 deletions
diff --git a/actionpack/lib/action_dispatch/routing/mapper.rb b/actionpack/lib/action_dispatch/routing/mapper.rb
index cdc29fb304..94e4bbd0d5 100644
--- a/actionpack/lib/action_dispatch/routing/mapper.rb
+++ b/actionpack/lib/action_dispatch/routing/mapper.rb
@@ -1134,6 +1134,25 @@ module ActionDispatch
# comment PATCH/PUT /sekret/comments/:id(.:format)
# comment DELETE /sekret/comments/:id(.:format)
#
+ # [:shallow_prefix]
+ # Prefixes nested shallow route names with specified prefix.
+ #
+ # scope :shallow_prefix => "sekret"
+ # resources :posts do
+ # resources :comments, :shallow => true
+ # end
+ # end
+ #
+ # The +comments+ resource here will have the following routes generated for it:
+ #
+ # post_comments GET /posts/:post_id/comments(.:format)
+ # post_comments POST /posts/:post_id/comments(.:format)
+ # new_post_comment GET /posts/:post_id/comments/new(.:format)
+ # edit_sekret_comment GET /comments/:id/edit(.:format)
+ # sekret_comment GET /comments/:id(.:format)
+ # sekret_comment PATCH/PUT /comments/:id(.:format)
+ # sekret_comment DELETE /comments/:id(.:format)
+ #
# === Examples
#
# # routes call <tt>Admin::PostsController</tt>