aboutsummaryrefslogtreecommitdiffstats
path: root/railties/doc/guides/source/getting_started_with_rails.txt
diff options
context:
space:
mode:
authorRyan Bigg <radarlistener@gmail.com>2008-11-19 22:18:24 +1030
committerRyan Bigg <radarlistener@gmail.com>2008-11-19 22:18:24 +1030
commit70a983a6a75d203ae5fdfbdec9c68d33fd79a766 (patch)
treeab49987a10732e669c2ed30d233e47ae19d9d8f5 /railties/doc/guides/source/getting_started_with_rails.txt
parent9dbb52d97e4ecc97fe793e3ac04a4fd285aa003b (diff)
parentc6e5ffbc5c5df14111d8925c82f143da73f6271b (diff)
downloadrails-70a983a6a75d203ae5fdfbdec9c68d33fd79a766.tar.gz
rails-70a983a6a75d203ae5fdfbdec9c68d33fd79a766.tar.bz2
rails-70a983a6a75d203ae5fdfbdec9c68d33fd79a766.zip
Merge branch 'master' of git@github.com:lifo/docrails
Diffstat (limited to 'railties/doc/guides/source/getting_started_with_rails.txt')
-rw-r--r--railties/doc/guides/source/getting_started_with_rails.txt8
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