avatars_controller.rb 236 Bytes EditWeb IDE 1 2 3 4 5 6 7 8 9 10 11 12 class Groups::AvatarsController < ApplicationController layout "profile" def destroy @group = Group.find_by(path: params[:group_id]) @group.remove_avatar! @group.save redirect_to edit_group_path(@group) end end