diff options
author | Ryan Bigg <radarlistener@gmail.com> | 2012-05-17 20:27:15 +1000 |
---|---|---|
committer | Ryan Bigg <radarlistener@gmail.com> | 2012-05-17 20:27:15 +1000 |
commit | a9f029ebf0229f3383b5d8853f6d7293e14ae512 (patch) | |
tree | 16c47add8026c150ed3f7758e462bdf0ea3d0f0d /guides | |
parent | 2c2d70eb95c5c02e0e380bc3dc8a8837fbf62f15 (diff) | |
download | rails-a9f029ebf0229f3383b5d8853f6d7293e14ae512.tar.gz rails-a9f029ebf0229f3383b5d8853f6d7293e14ae512.tar.bz2 rails-a9f029ebf0229f3383b5d8853f6d7293e14ae512.zip |
[getting started] briefly explain form_for with array parameters
Diffstat (limited to 'guides')
-rw-r--r-- | guides/source/getting_started.textile | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/guides/source/getting_started.textile b/guides/source/getting_started.textile index ad31f7ce3b..8463887cfd 100644 --- a/guides/source/getting_started.textile +++ b/guides/source/getting_started.textile @@ -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 |