avatars_controller.rb 259 Bytes
Newer Older
1
class Profiles::AvatarsController < Profiles::ApplicationController
2 3 4
  def destroy
    @user = current_user

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

Lin Jen-Shin's avatar
Lin Jen-Shin committed
7
    redirect_to profile_path, status: :found
8 9
  end
end