From 251df827a5308d483a95242970569075ab655703 Mon Sep 17 00:00:00 2001 From: Steven Thonus Date: Mon, 27 Jan 2014 22:34:05 +0100 Subject: added group avatars --- app/controllers/groups/avatars_controller.rb | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 app/controllers/groups/avatars_controller.rb (limited to 'app/controllers/groups/avatars_controller.rb') diff --git a/app/controllers/groups/avatars_controller.rb b/app/controllers/groups/avatars_controller.rb new file mode 100644 index 00000000000..38071410f40 --- /dev/null +++ b/app/controllers/groups/avatars_controller.rb @@ -0,0 +1,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 -- cgit v1.2.1