必须更改我的路线才能正确。
devise_for :users, :controllers => { :registrations => 'registrations' }
devise_scope :user do
get 'join' => 'devise/registrations#new', :as => :new_user_registration
put 'join' => 'devise/registrations#create', :as => :user_registration
get 'login' => 'devise/sessions#new', :as => :new_user_session
post 'login' => 'devise/sessions#create', :as => :user_session
delete 'logout' => 'devise/sessions#destroy', :as => :destroy_user_session
get 'account_settings' => 'devise/registrations#edit', :as => :edit_user_registration
put 'account_settings' => 'devise/registrations#update', :as => :update_user_registration
get 'forgot_password' => 'devise/passwords#new', :as => :new_user_password
get 'user', :to => 'user_pages#home', :as => :user_root
end
match '/user' => 'user_pages#home', :as => :user_root
并添加到列表中:
delete 'join' => 'devise/registrations#destroy', :as => :user_registration
也可能是我从头开始重新编写了整个应用程序。