Added ability to manage groups from admin

This commit is contained in:
Dmitriy Zaporozhets 2012-10-03 12:49:43 +03:00
parent 010ac2b17f
commit 224fb5770c
11 changed files with 26 additions and 7 deletions

View file

@ -52,6 +52,14 @@ class Admin::GroupsController < AdminController
redirect_to :back, notice: 'Group was successfully updated.'
end
def remove_project
@project = Project.find(params[:project_id])
@project.group_id = nil
@project.save
redirect_to :back, notice: 'Group was successfully updated.'
end
def destroy
@group.destroy