提交 a9f029eb 编写于 作者: R Ryan Bigg

[getting started] briefly explain form_for with array parameters

上级 2c2d70eb
......@@ -1388,7 +1388,10 @@ So first, we'll wire up the Post show template
</erb>
This adds a form on the +Post+ show page that creates a new comment by
calling the +CommentsController+ +create+ action. Let's wire that up:
calling the +CommentsController+ +create+ action. The +form_for+ call here uses
an array, which will build a nested route, such as +/posts/1/comments+.
Let's wire up the +create+:
<ruby>
class CommentsController < ApplicationController
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册