我想在发送重置传递指令后重定向到一个页面,所以,通过devise文档,我将这个添加到了我的password_controller中
protected
def after_sending_reset_password_instructions_path_for(resource_name)
'buyers/sign_in'
end在路由中,我有
devise_for :buyers, :controllers => { :passwords => "passwords" }如果我将‘but 'xxxxxxx'’添加到函数中,我甚至可以在我的服务器中看到这个输出,但它不会重定向到我返回的路径。有什么问题吗?
发布于 2014-08-07 20:04:52
最后,问题是由于'create‘函数过载和严重改变(也调用不符合我的需求的超级函数),不得不编辑它并添加以下内容
if successfully_sent?(resource)
redirect_to new_partner_session_path
else才能正常工作。
https://stackoverflow.com/questions/25181194
复制相似问题