summaryrefslogtreecommitdiff
path: root/users/app
diff options
context:
space:
mode:
authorjessib <jessib@leap.se>2013-06-20 11:54:16 -0700
committerjessib <jessib@leap.se>2013-06-20 11:54:16 -0700
commitebdceb115f8a426bea61e4bf144463b67dbaf125 (patch)
tree0552f103e9a357b65af6b1baa2494cc413bb6d6e /users/app
parent3a89159d249c76ed7dbde3e51541ffc82b74ccdb (diff)
For removing account, redirect to root path, and ask confirmation message:
https://leap.se/code/issues/2923
Diffstat (limited to 'users/app')
-rw-r--r--users/app/controllers/users_controller.rb2
-rw-r--r--users/app/views/users/_cancel_account.html.haml2
2 files changed, 2 insertions, 2 deletions
diff --git a/users/app/controllers/users_controller.rb b/users/app/controllers/users_controller.rb
index dff1ed5..38a69e3 100644
--- a/users/app/controllers/users_controller.rb
+++ b/users/app/controllers/users_controller.rb
@@ -43,7 +43,7 @@ class UsersController < ApplicationController
def destroy
@user.destroy
- redirect_to admin? ? users_path : login_path
+ redirect_to admin? ? users_path : root_path
end
protected
diff --git a/users/app/views/users/_cancel_account.html.haml b/users/app/views/users/_cancel_account.html.haml
index 756170b..c5ab36a 100644
--- a/users/app/views/users/_cancel_account.html.haml
+++ b/users/app/views/users/_cancel_account.html.haml
@@ -4,6 +4,6 @@
%small You will not be able to login anymore.
- else
=t :admin_cancel_account, :username => @user.login
-= link_to user_path(@user), :method => :delete, :class => "btn btn-danger" do
+= link_to user_path(@user), :method => :delete, :confirm => t(:confirm_question), :class => "btn btn-danger" do
%i.icon-remove.icon-white
=t :remove_account