From 1f87adfbb0a1f0d9be5c1eea33a7ef675a913b49 Mon Sep 17 00:00:00 2001 From: Andy Lindeman Date: Wed, 11 Jul 2012 10:42:25 -0500 Subject: Fixes typo in CommentsController#create example * comments.build will not actually persist the comment --- guides/source/engines.textile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'guides/source') 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 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 -- cgit v1.2.3