From 9707d1787d80a9951b729b7fea7b59cbad3fc77a Mon Sep 17 00:00:00 2001 From: Mike Gunderloy Date: Tue, 18 Nov 2008 10:50:21 -0600 Subject: FIx minor errors in Getting Started & Associations guides --- railties/doc/guides/source/getting_started_with_rails.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'railties/doc/guides/source/getting_started_with_rails.txt') diff --git a/railties/doc/guides/source/getting_started_with_rails.txt b/railties/doc/guides/source/getting_started_with_rails.txt index 00c6d52eef..9adcc729a3 100644 --- a/railties/doc/guides/source/getting_started_with_rails.txt +++ b/railties/doc/guides/source/getting_started_with_rails.txt @@ -1021,7 +1021,7 @@ class CommentsController < ApplicationController def show @post = Post.find(params[:post_id]) - @comment = Comment.find(params[:id]) + @comment = @post.comments.find(params[:id]) end def new @@ -1033,7 +1033,7 @@ class CommentsController < ApplicationController @post = Post.find(params[:post_id]) @comment = @post.comments.build(params[:comment]) if @comment.save - redirect_to post_comment_path(@post, @comment) + redirect_to post_comment_url(@post, @comment) else render :action => "new" end @@ -1041,14 +1041,14 @@ class CommentsController < ApplicationController def edit @post = Post.find(params[:post_id]) - @comment = Comment.find(params[:id]) + @comment = @post.comments.find(params[:id]) end def update @post = Post.find(params[:post_id]) @comment = Comment.find(params[:id]) if @comment.update_attributes(params[:comment]) - redirect_to post_comment_path(@post, @comment) + redirect_to post_comment_url(@post, @comment) else render :action => "edit" end -- cgit v1.2.3