我已将范围添加到我的设计代码
devise_scope :authorizes do
authenticated :authorizes do
root :to => "auth#main"
end
unauthenticated :authorizes do
root :to => "devise/session#new"
end
end
root :to => "auth#main"
scope
?localhost:3000
为NO route matches [get] "/"
。
醇>
谢谢。
答案 0 :(得分:0)
更新 application_controller
def after_sign_in_path_for(resource)
if authorize_signed_in?
amain_path
end
end
def after_sign_out_path_for(resource)
if authorize_signed_in?
new_authorize_session_path
end
end