删除Devise用户(没有路由匹配[删除]“users/edit.8”
我不明白我的rails应用程序在命令输出“rake routes”中找不到路径Edit_user_registration_path(usr)。删除Devise用户(没有路由匹配[删除]“users/edit.8”
没有Entiendo PORqué时MIaplicación轨没有encuentra EL路径Edit_user_registration_path(USR)宽多罗presenta耙路连接苏萨利达。
的routes.rb中 resources :comentarios resources :productos resources :seudonimos resources :configuraciones resources :sociales resources :clientespotenciales do member do get :confirmarsi get :confirmarno get :confirmarbaja get :conocidos end collection do get :altaunete get :altaconocidos get :confirmaunete get :confirmacion end end get 'unete', to: 'clientespotenciales#new', as: 'unete' get 'altaunete', to: 'clientespotenciales#altaunete', as: 'altaunete' get 'confirmaunete', to: 'clientespotenciales#confirmaunete', as: 'confirmaunete' get 'confirmarcorreo', to: 'clientespotenciales#confirmacion', as: 'confirmacorreo' resources :clipotcategorias resources :usuarios do member do get :seudonimos, format: :json end end get 'textos/lista' resources :textos do member do get :leer end end resources :categoriastextos concern :the_role, TheRole::AdminRoutes.new namespace :admin do concerns :the_role end get 'web/index' get 'web/admin' get 'web/contacto' get 'web/contactopublicidad' get 'web/privacidad' get 'web/avisocookies' get 'web/avisolegal' get 'web/contratoescritores' get 'web/configuracion' get 'web/textocontratoescritores' get 'web/faq' post 'contactopublicidad', to: 'web#contactopublicidad', as: 'contactopublicidad' resources :web do member do get :setescritor get :setlector delete :borrarusuario end end devise_for :users
日志
的ActionController :: RoutingError(没有路由匹配[删除] “/users/edit.8”):
在视图中LINK
<%=的link_to 'Borrar- NUEVO',edit_user_registration_path( USR),方法:删除,数据:{确认: '?Estas Seguro的'},类: “右admin_links” %>
的设计的路由注:没有更多的路线形成用户i耙路线显示
new_user_session GET /users/sign_in(.:format) devise/sessions#new
user_session POST /users/sign_in(.:format) devise/sessions#create
destroy_user_session GET /users/sign_out(.:format) devise/sessions#destroy
user_password POST /users/password(.:format) devise/passwords#create
new_user_password GET /users/password/new(.:format) devise/passwords#new
edit_user_password GET /users/password/edit(.:format) devise/passwords#edit
PATCH /users/password(.:format) devise/passwords#update
PUT /users/password(.:format) devise/passwords#update
cancel_user_registration GET /users/cancel(.:format) devise/registrations#cancel
user_registration POST /users(.:format) devise/registrations#create
new_user_registration GET /users/sign_up(.:format) devise/registrations#new
edit_user_registration GET /users/edit(.:format) devise/registrations#edit
PATCH /users(.:format) devise/registrations#update
PUT /users(.:format) devise/registrations#update
DELETE /users(.:format) devise/registrations#destroy
user_confirmation POST /users/confirmation(.:format) devise/confirmations#create
new_user_confirmation GET /users/confirmation/new(.:format) devise/confirmations#new
GET /users/confirmation(.:format) devise/confirmations#show
root GET / web#index
您的link_to指定edit_user_registration_path(usr)
。尝试user_registration_path(usr)
。
前者将删除users/edit.8
,这不是上述路径文件中的路径。您只有一个DELETE路径(users/8
)