[英]Devise not performing an action after customizing redirects
自定义设计重定向后,我要执行调用操作,例如,我有一个称为Storys控制器的控制器和一个表示之前的过滤器
befroe_filter :authenticate_user!
它将我重定向到登录页面,但登录后不会将我发送回上一个请求。我的代码如下
def after_sign_in_path_for(resource)
user_profile_path(current_user)
end
像新操作一样登录后,我该如何将我重定向到上一个操作。
更改为此:
def after_sign_in_path_for(resource)
stored_location_for(resource) || user_profile_path(current_user)
end
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.