Redirect to requested page after succesful login

Hi, i have never worked with ruby, but i have a page that uses it, the problem is that i want to take a link and send it to other users, so that when the user clicks it the page detects that it haven’t log in and redirect to the login page, after successful login the login page should redirect the user to the requested page.
the problem is that it redirecto to the home page after the login instead the requested page

this fucntionality is available in ASP.NET and PHP

the instructions says that new features should be writen by the requeted user, i don’t know where to look to add this feature (lots of files and lines of code) if someone can give me directions i can try to make an update, i really don’t know pearl but i can try to understand the specific lines of code


Hi Luis,

You can use Device gem



Hi Luis, can you provide a bit more information about the application you have, like what gems you are using for authentication?

Hey everyone!

This mailing list (rubyonrails-core) is intended for discussion about development of the framework itself, not usage of it.

For support issues or usage questions like this one that are not issues with Rails itself, please post to the rubyonrails-talk mailing list ( or somewhere like StackOverflow using the ruby-on-rails tag ( You can also drop in to the #rubyonrails channel on for realtime help. You’ll be more likely to get a quick answer using one of those options.

That said, if any of the current participants want to keep helping out Luis, feel free to keep communicating off-list.