【发布时间】:2012-10-26 23:24:15
【问题描述】:
当该页面需要登录Devise Resetting Session On Login 时,我在重定向到上次访问的页面时遇到问题,有人指出您可以按照此处的代码示例进行操作:https://github.com/plataformatec/devise/wiki/How-To%3A-redirect-to-a-specific-page-on-successful-sign-in
那个例子调用stored_location_for(resource)...那个集合在哪里?
当在我的适当控制器中与before_filter :authenticate_user! 结合使用时,该示例可以完美运行。查看authenticate_#{resource}!、https://github.com/plataformatec/devise/blob/master/lib/devise/controllers/helpers.rb的源代码,似乎没有保存位置。
以前的位置存储在世界的什么地方?
【问题讨论】:
标签: ruby-on-rails authentication redirect devise