[英]Return user to original page after logging in (rails session mgmt)
I'm looking for some general guidance as to how to return a user back to the original page they were viewing after trying to log-in. 我正在寻找有关如何在尝试登录后将用户返回到他们正在查看的原始页面的一些常规指导。
The way I have the site setup now is that if a user visits the Store page, for example, and then clicks the login button in the upper right, the user is returned to the default landing page. 我现在进行网站设置的方式是,例如,如果用户访问“商店”页面,然后单击右上角的登录按钮,则该用户将返回到默认登录页面。
Any help would be greatly appreciated! 任何帮助将不胜感激!
There are two ways how to do it: 有两种方法可以做到这一点:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.