2013-12-02 13:03:07 -05:00
|
|
|
class Profiles::AvatarsController < ApplicationController
|
|
|
|
layout "profile"
|
|
|
|
|
|
|
|
def destroy
|
|
|
|
@user = current_user
|
|
|
|
@user.remove_avatar!
|
|
|
|
|
|
|
|
@user.save
|
2013-12-11 10:30:22 -05:00
|
|
|
@user.reset_events_cache
|
|
|
|
|
2013-12-02 13:03:07 -05:00
|
|
|
redirect_to profile_path
|
|
|
|
end
|
|
|
|
end
|