Sha256: 301a45403f1d5af7e51a30b68ce445e97a257f14581ec5e9728153c0dcda32e7
Contents?: true
Size: 798 Bytes
Versions: 15
Compression:
Stored size: 798 Bytes
Contents
class Admin::GroupController < AdminController before_filter { licensed("groups") } def index @group = Group.new @groups = Group.order(:name).sys(_sid).all end def create @group = Group.new(params[:group]) @group.system_id = _sid if @group.save flash[:notice] = "Group created" Activity.add(_sid, "Created group '#{@group.name}'", current_user.id, "Groups", '') redirect_to "/admin/groups" else @groups = Group.sys(_sid).order(:name).all render "index" end end def destroy @group = Group.find_sys_id(_sid, params[:id]) Group.destroy(params[:id]) Activity.add(_sid, "Deleted group '#{@group.name}'", current_user.id, "Groups", '') flash[:notice] = "Group deleted" redirect_to "/admin/groups" end end
Version data entries
15 entries across 15 versions & 1 rubygems