aboutsummaryrefslogtreecommitdiffstats
path: root/guides
diff options
context:
space:
mode:
authorBrian Kim <briankimpossible@gmail.com>2013-02-18 14:20:37 -0500
committerBrian Kim <briankimpossible@gmail.com>2013-02-18 14:27:25 -0500
commitf9f6fc7a91fecc7a52c812d2900b9ae5d4636743 (patch)
treee1aa7c4b0388a08b075d0d1f0b45fb53e6edc623 /guides
parent8743f800db529ef21a757b70230527fdae0691cc (diff)
downloadrails-f9f6fc7a91fecc7a52c812d2900b9ae5d4636743.tar.gz
rails-f9f6fc7a91fecc7a52c812d2900b9ae5d4636743.tar.bz2
rails-f9f6fc7a91fecc7a52c812d2900b9ae5d4636743.zip
Fix bug in code example from layouts and rendering guide
The code in 2.3.2 assumed that render has an alert option like redirect_to to create a flash alert message, but it doesn't.
Diffstat (limited to 'guides')
-rw-r--r--guides/source/layouts_and_rendering.md3
1 files changed, 2 insertions, 1 deletions
diff --git a/guides/source/layouts_and_rendering.md b/guides/source/layouts_and_rendering.md
index 339008ab9e..bfd1a7c61b 100644
--- a/guides/source/layouts_and_rendering.md
+++ b/guides/source/layouts_and_rendering.md
@@ -568,7 +568,8 @@ def show
@book = Book.find_by_id(params[:id])
if @book.nil?
@books = Book.all
- render "index", alert: "Your book was not found!"
+ flash[:alert] = "Your book was not found"
+ render "index"
end
end
```