Skip to content

Commit

Permalink
added shallow_prefix option description in documantation
Browse files Browse the repository at this point in the history
It is in response for confusion in issue rails#5301
  • Loading branch information
Lukasz Sarnacki committed Mar 26, 2012
1 parent fc25feb commit 0c5ca07
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions actionpack/lib/action_dispatch/routing/mapper.rb
Expand Up @@ -1134,6 +1134,25 @@ def resource(*resources, &block)
# comment PATCH/PUT /sekret/comments/:id(.:format) # comment PATCH/PUT /sekret/comments/:id(.:format)
# comment DELETE /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 # === Examples
# #
# # routes call <tt>Admin::PostsController</tt> # # routes call <tt>Admin::PostsController</tt>
Expand Down

0 comments on commit 0c5ca07

Please sign in to comment.