aboutsummaryrefslogtreecommitdiffstats
path: root/guides/source
diff options
context:
space:
mode:
authorAndy Lindeman <alindeman@gmail.com>2012-07-11 10:42:25 -0500
committerAndy Lindeman <alindeman@gmail.com>2012-07-11 10:42:25 -0500
commit1f87adfbb0a1f0d9be5c1eea33a7ef675a913b49 (patch)
tree6825d6e02a26f8906939bf7711eab3e1599edc1c /guides/source
parent94527eaafbfc2a8952dc991c9d2f1593bd04e89a (diff)
downloadrails-1f87adfbb0a1f0d9be5c1eea33a7ef675a913b49.tar.gz
rails-1f87adfbb0a1f0d9be5c1eea33a7ef675a913b49.tar.bz2
rails-1f87adfbb0a1f0d9be5c1eea33a7ef675a913b49.zip
Fixes typo in CommentsController#create example
* comments.build will not actually persist the comment
Diffstat (limited to 'guides/source')
-rw-r--r--guides/source/engines.textile2
1 files changed, 1 insertions, 1 deletions
diff --git a/guides/source/engines.textile b/guides/source/engines.textile
index dca75fbc27..acd03d7e0c 100644
--- a/guides/source/engines.textile
+++ b/guides/source/engines.textile
@@ -347,7 +347,7 @@ The form will be making a +POST+ request to +/posts/:post_id/comments+, which wi
<ruby>
def create
@post = Post.find(params[:post_id])
- @comment = @post.comments.build(params[:comment])
+ @comment = @post.comments.create(params[:comment])
flash[:notice] = "Comment has been created!"
redirect_to post_path
end