aboutsummaryrefslogtreecommitdiffstats
path: root/guides/source
diff options
context:
space:
mode:
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