aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_dispatch
diff options
context:
space:
mode:
authorVijay Dev <vijaydev.cse@gmail.com>2012-03-27 21:26:37 +0530
committerVijay Dev <vijaydev.cse@gmail.com>2012-03-27 21:26:37 +0530
commitb42fbd3ecbc3e2c55987e0ae6331443dfd68d5b4 (patch)
treedd296efc489c22850d6cc7fa8d7a69da5e122b54 /actionpack/lib/action_dispatch
parent888fcca01b736b7f91041b7a6a1b162af6688f7a (diff)
parentae040ed6d8c48bf0cd6d5d6b434d60c9c8c27f81 (diff)
downloadrails-b42fbd3ecbc3e2c55987e0ae6331443dfd68d5b4.tar.gz
rails-b42fbd3ecbc3e2c55987e0ae6331443dfd68d5b4.tar.bz2
rails-b42fbd3ecbc3e2c55987e0ae6331443dfd68d5b4.zip
Merge branch 'master' of github.com:lifo/docrails
Diffstat (limited to 'actionpack/lib/action_dispatch')
-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 20cdf67cf0..fccbff1749 100644
--- a/actionpack/lib/action_dispatch/routing/mapper.rb
+++ b/actionpack/lib/action_dispatch/routing/mapper.rb
@@ -1135,6 +1135,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" do
+ # 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>