summaryrefslogtreecommitdiff
path: root/app/controllers
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/users_controller.rb3
1 files changed, 1 insertions, 2 deletions
diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb
index ec52cff..1404b0e 100644
--- a/app/controllers/users_controller.rb
+++ b/app/controllers/users_controller.rb
@@ -53,8 +53,7 @@ class UsersController < ApplicationController
end
def enable
- @user.enabled = true
- @user.save
+ @user.account.enable
flash[:notice] = I18n.t("actions.user_enabled_message", username: @user.username)
redirect_to :back
end