2009-08-02 18:42:52 +02:00
|
|
|
class Foodcoop::WorkgroupsController < ApplicationController
|
|
|
|
|
|
|
|
before_filter :authenticate_membership_or_admin,
|
|
|
|
:except => [:index]
|
|
|
|
|
|
|
|
def index
|
|
|
|
@workgroups = Workgroup.all :order => "name"
|
|
|
|
end
|
|
|
|
|
|
|
|
def edit
|
|
|
|
@workgroup = Workgroup.find(params[:id])
|
|
|
|
end
|
|
|
|
|
|
|
|
def update
|
|
|
|
@workgroup = Workgroup.find(params[:id])
|
|
|
|
if @workgroup.update_attributes(params[:workgroup])
|
2011-05-16 00:34:43 +02:00
|
|
|
redirect_to foodcoop_workgroups_url, :notice => "Arbeitsgruppe wurde aktualisiert"
|
2009-08-02 18:42:52 +02:00
|
|
|
else
|
|
|
|
render :action => 'edit'
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|