diff options
Diffstat (limited to 'guides')
-rw-r--r-- | guides/source/getting_started.md | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/guides/source/getting_started.md b/guides/source/getting_started.md index cd7bc399ac..bdb9d3e51f 100644 --- a/guides/source/getting_started.md +++ b/guides/source/getting_started.md @@ -534,7 +534,7 @@ def create @post = Post.new(params[:post]) @post.save - redirect_to post + redirect_to @post end ``` @@ -609,7 +609,7 @@ look like this: @post = Post.new(params[:post].permit(:title, :text)) @post.save - redirect_to post + redirect_to @post end ``` @@ -763,7 +763,7 @@ def create @post = Post.new(params[:post].permit(:title, :text)) if @post.save - redirect_to post + redirect_to @post else render 'new' end @@ -900,7 +900,7 @@ def update @post = Post.find(params[:id]) if @post.update(params[:post].permit(:title, :text)) - redirect_to post + redirect_to @post else render 'edit' end |