Class: Profiles::AvatarsController

Inherits:
ApplicationController
  • Object
show all
Defined in:
app/controllers/profiles/avatars_controller.rb

Instance Method Summary collapse

Instance Method Details

#destroyObject


4
5
6
7
8
9
10
# File 'app/controllers/profiles/avatars_controller.rb', line 4

def destroy
  @user = current_user

  Users::UpdateService.new(current_user, user: @user).execute { |user| user.remove_avatar! }

  redirect_to profile_path, status: :found
end