debian-mirror-gitlab/app/controllers/profiles/avatars_controller.rb

10 lines
256 B
Ruby
Raw Normal View History

2015-09-11 14:41:01 +05:30
class Profiles::AvatarsController < Profiles::ApplicationController
2014-09-02 18:07:02 +05:30
def destroy
@user = current_user
2018-03-17 18:26:18 +05:30
Users::UpdateService.new(current_user, user: @user).execute { |user| user.remove_avatar! }
2014-09-02 18:07:02 +05:30
2017-09-10 17:25:29 +05:30
redirect_to profile_path, status: 302
2014-09-02 18:07:02 +05:30
end
end