从我的rake routes
:
user_registration POST /users(.:format) devise/registrations#create
new_user_registration GET /users/sign_up(.:format) devise/registrations#new
因此,当我单击注册表单中的提交按钮时,它会将我移至/users
.
我怎样才能改变它user_registration POST
呢/users/sign_up(.:format)
?我试过这样的事情:
devise_for :users
as :user do
post 'sign_up' => 'devise/registrations#create', as: 'user_registration'
end
但是存在冲突,因为user_registration
前缀已经由devise_for