Skip to content

Commit

Permalink
fix close my account button
Browse files Browse the repository at this point in the history
  • Loading branch information
lazaronixon committed Feb 17, 2022
1 parent b729a46 commit 973752a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/generators/authentication/authentication_generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def create_migrations

def add_routes
route "resource :password_resets, except: [:show, :destroy]"
route "resource :cancellations, only: [:new, :destroy]"
route "resource :cancellations, only: [:new, :create]"
route "resource :passwords, only: [:update, :edit]"
route "delete 'sign_out', to: 'sessions#destroy'"
route "post 'sign_up', to: 'registrations#create'"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
class CancellationsController < ApplicationController
def destroy
def create
Current.<%= singular_table_name %>.destroy
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ class CancellationsController < ApplicationController
def new
end

def destroy
def create
Current.<%= singular_table_name %>.destroy
redirect_to sign_in_path, notice: "Bye! Your account has been successfully cancelled"
end
Expand Down

0 comments on commit 973752a

Please sign in to comment.