我尝试实施用户电子邮件确认。为了实现这一点,我需要为电子邮件设置其他嵌套路由。但是,它会干扰以前使用的设计路线自定义名称:
devise_for :users, path: "", path_names: {sign_in: "login", sign_up:
"register", sign_out: "logout"}
所以当我做这样的事情时:
devise_for :users, path: "", path_names: {sign_in: "login", sign_up: "register", sign_out: "logout"} do
member do
get :confirm_email
end
end
我没有其他的Confirm_email路由。我也尝试过:
devise_for :users, path: "", path_names: {sign_in: "login", sign_up: "register", sign_out: "logout"}
devise_for :users do
member do
get :confirm_email
end
end
但是我得到的只是关于重复路线的错误消息。如何解决该问题并为用户使用嵌套资源,并为设计路径保留自定义名称?
红宝石版本:2.3.6, 导轨:5.2.1, 设计:4.2