提交 ba1225c7 编写于 作者: R Rick Olson

add some more detail on nested resource docs [Rick]

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5877 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
上级 28767075
...@@ -175,7 +175,15 @@ def initialize(entity, options) ...@@ -175,7 +175,15 @@ def initialize(entity, options)
# map.resources :articles do |article| # map.resources :articles do |article|
# article.resources :comments # article.resources :comments
# end # end
# #
# The comment resources work the same, but must now include a value for :article_id.
#
# comments_url(@article)
# comment_url(@article, @comment)
#
# comments_url(:article_id => @article)
# comment_url(:article_id => @article, :id => @comment)
#
# * <tt>:name_prefix</tt> -- define a prefix for all generated routes, usually ending in an underscore. # * <tt>:name_prefix</tt> -- define a prefix for all generated routes, usually ending in an underscore.
# Use this if you have named routes that may clash. # Use this if you have named routes that may clash.
# #
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册