diff options
Diffstat (limited to 'app/controllers/profiles/avatars_controller.rb')
-rw-r--r-- | app/controllers/profiles/avatars_controller.rb | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/app/controllers/profiles/avatars_controller.rb b/app/controllers/profiles/avatars_controller.rb index daa51ae41df..408650aac54 100644 --- a/app/controllers/profiles/avatars_controller.rb +++ b/app/controllers/profiles/avatars_controller.rb @@ -1,10 +1,9 @@ class Profiles::AvatarsController < Profiles::ApplicationController def destroy @user = current_user - @user.remove_avatar! - @user.save + Users::UpdateService.new(@user).execute { |user| user.remove_avatar! } - redirect_to profile_path + redirect_to profile_path, status: 302 end end |