Skip to content

Commit

Permalink
Redirect to "/users/sign_in" after AccountDeletion
Browse files Browse the repository at this point in the history
There is no point to redirect to "/stream" after the account deletion
because the user is logged off.
  • Loading branch information
cmrd-senya committed Apr 7, 2016
1 parent a414fb2 commit 77bd220
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/controllers/users_controller.rb
Expand Up @@ -95,7 +95,7 @@ def destroy
if params[:user] && params[:user][:current_password] && current_user.valid_password?(params[:user][:current_password])
current_user.close_account!
sign_out current_user
redirect_to(stream_path, :notice => I18n.t('users.destroy.success'))
redirect_to(new_user_session_path(format: request[:format]), notice: I18n.t("users.destroy.success"))
else
if params[:user].present? && params[:user][:current_password].present?
flash[:error] = t 'users.destroy.wrong_password'
Expand Down

0 comments on commit 77bd220

Please sign in to comment.