所以我使用Devise gem来处理rails app中的用户, 我已经找到了你在 Application_controller 中使用的设计方法: after_sign_in_path_for 和 after_sign_out_path_for ,但我希望在成功之后有一个特定的路径< strong> sign_up 但是Devise没有这种方法,我该怎么办?
答案 0 :(得分:0)
我这样做了,路径取决于布尔状态
def after_sign_in_path_for(resource_or_scope)
if(current_user.firebase_form === false)
user_form_firebase_user_form_path
else
root_path
end
end