From 7ada0fb598b98bbb5a1dab371adb8f2348505df1 Mon Sep 17 00:00:00 2001 From: Keith Wansbrough Date: Thu, 27 Jan 2011 11:39:47 -0800 Subject: Refer to the correct action - it's the update action, in the special case where we want to render the edit view. --- railties/guides/source/layouts_and_rendering.textile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/railties/guides/source/layouts_and_rendering.textile b/railties/guides/source/layouts_and_rendering.textile index f0e40b0980..fe400d3358 100644 --- a/railties/guides/source/layouts_and_rendering.textile +++ b/railties/guides/source/layouts_and_rendering.textile @@ -211,7 +211,7 @@ h5. Wrapping it up The above three ways of rendering (rendering another template within the controller, rendering a template within another controller and rendering an arbitrary file on the file system) are actually variants of the same action. -In fact, in the BooksController class, inside of the edit action where we want to render the edit template if the book does not update successfully, all of the following render calls would all render the +edit.html.erb+ template in the +views/books+ directory: +In fact, in the BooksController class, inside of the update action where we want to render the edit template if the book does not update successfully, all of the following render calls would all render the +edit.html.erb+ template in the +views/books+ directory: render :edit -- cgit v1.2.3