diff options
author | Mike Gunderloy <MikeG1@larkfarm.com> | 2008-11-18 10:50:21 -0600 |
---|---|---|
committer | Mike Gunderloy <MikeG1@larkfarm.com> | 2008-11-18 10:50:21 -0600 |
commit | 9707d1787d80a9951b729b7fea7b59cbad3fc77a (patch) | |
tree | 82249dea22abb0b896ab418a877ea8aa4623614c /railties/doc/guides/source/getting_started_with_rails.txt | |
parent | c62f973c749beac8947ff5119af43fbde2547eb1 (diff) | |
download | rails-9707d1787d80a9951b729b7fea7b59cbad3fc77a.tar.gz rails-9707d1787d80a9951b729b7fea7b59cbad3fc77a.tar.bz2 rails-9707d1787d80a9951b729b7fea7b59cbad3fc77a.zip |
FIx minor errors in Getting Started & Associations guides
Diffstat (limited to 'railties/doc/guides/source/getting_started_with_rails.txt')
-rw-r--r-- | railties/doc/guides/source/getting_started_with_rails.txt | 8 |
1 files changed, 4 insertions, 4 deletions
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 |