Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Refer to the correct action - it's the update action, in the special …
…case where we want to render the edit view.
  • Loading branch information
kw217 committed Jan 27, 2011
1 parent cc9301f commit 7ada0fb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion railties/guides/source/layouts_and_rendering.textile
Expand Up @@ -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. 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:


<ruby> <ruby>
render :edit render :edit
Expand Down

0 comments on commit 7ada0fb

Please sign in to comment.