You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The SessionController::new method (sign_in link) should take an optional return_to parameter and pass it on to SessionController::create via a hidden form field. With this change, a user can click on a "Login" link from any page of the application, log in, and be automatically returned to whatever page she was originally on.
SessionController::destroy should also take an optional return_to parameter and redirect to it, so that a logged-in user can click on a "Logout" link from any page, and be automatically returned to that page as a logged-out users. (See also http://github.com/thoughtbot/clearance/issues/23 )
Closing this one due to old age. We haven't needed this functionality in any of our apps, so we take that as a sign that this isn't necessary right now.
The SessionController::new method (sign_in link) should take an optional return_to parameter and pass it on to SessionController::create via a hidden form field. With this change, a user can click on a "Login" link from any page of the application, log in, and be automatically returned to whatever page she was originally on.
SessionController::destroy should also take an optional return_to parameter and redirect to it, so that a logged-in user can click on a "Logout" link from any page, and be automatically returned to that page as a logged-out users. (See also http://github.com/thoughtbot/clearance/issues/23 )
I committed a fix to this to my fork at
http://github.com/rnewman57/clearance/commit/57bba85dc63ba7f0ae7a138743ab228afb994ac6
This fork and issue are inspired by this conversation in the Clearance Google Group:
http://groups.google.com/group/thoughtbot-clearance/browse_thread/thread/b2da1c06fdb503c7#
The text was updated successfully, but these errors were encountered: