I am starting a new web app and I am using Devise for the authentication.
I have got Devise working with register, login, edit and viewing the user profile. The only problem I am having is clicking the 'Delete Account' just redirects to /users
and doesn't actually delete the user. What am I doing wrong?
The delete account button
= link_to "Cancel my account", registration_path(resource_name), :confirm => "Are you sure?", :method => :delete
As far as I know, I haven't changed anything that would break this. The delete account button I want to use is
= negative_trash_button_link_to "Cancel my account", registration_path(resource_name), :method => :delete, :confirm => "You sure?"
The negative_trash_button_link_to
is in the css3buttons gem.
Edit: My routes.rb
resources :posts
ActiveAdmin.routes(self)
devise_for :admin_users, ActiveAdmin::Devise.config
root :to => "home#index"
devise_for :users do
get "/users/sign_out" => "devise/sessions#destroy", :as => :destroy_user_session
end
resources :users, :only => :show