我安装了设计,它工作正常,但重定向登录。当用户从应用程序的任何页面登录时,Devise会将用户重定向到首页,而不是在同一页面上重定向。我试着实现设计的How_to解决方案,但没有任何帮助。登录重定向到首页,而不是停留在同一页
我application_controller写道:
def after_sign_in_path_for(resource)
current_user_path
end
但它给错误:
undefined local variable or method `current_user_path' for #<Devise::SessionsController:0xaeacc34>
当我写:
def after_sign_in_path_for(resource)
current_user_path
end
它提供:
undefined method `user_url'
这个问题的解决方案是什么?任何身体都可以帮助吗?
为好,它重定向到主页。我需要用户留在他以前的同一页面上。 – user2206724 2013-03-28 08:50:50