concept current_user in category rails
appears as: current_user, current_user

This is an excerpt from Manning's book Flexible Rails: Flex 3 on Rails 2.
We create a new method called create_xml
in the SessionsController. It’s a copy-paste-modify of the create method
which was created for us. (We don’t worry about refactoring the duplicated code out into a method, because we know we’ll be refactoring this later when we convert to REST.) Upon successful login, we render XML of the current_user
. If the login fails, we render the text "badlogin"
.
in the SessionsController. It’s a copy-paste-modify of the create method
which was created for us. (We don’t worry about refactoring the duplicated code out into a method, because we know we’ll be refactoring this later when we convert to REST.) Upon successful login, we render XML of the current_user
. If the login fails, we render the text "badlogin"
.