2014-12-04 92 views
1

我不明白我的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 

回答

0

您的link_to指定edit_user_registration_path(usr)。嘗試user_registration_path(usr)

前者將刪除users/edit.8,這不是上述路徑文件中的路徑。您只有一個DELETE路徑(users/8