Class: Profiles::AvatarsController

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

Instance Method Summary collapse

Instance Method Details

#destroyObject


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

def destroy
  @user = current_user
  @user.remove_avatar!

  @user.save
  @user.reset_events_cache

  redirect_to profile_path
end