Moved foodcoop/workgroups into new namespace foodcoop. Closes #20
This commit is contained in:
parent
1a8026c5a7
commit
0d910dfbbd
13 changed files with 196 additions and 38 deletions
26
app/controllers/foodcoop/workgroups_controller.rb
Normal file
26
app/controllers/foodcoop/workgroups_controller.rb
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
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])
|
||||
flash[:notice] = "Arbeitsgruppe wurde aktualisiert"
|
||||
redirect_to foodcoop_workgroups_url
|
||||
else
|
||||
render :action => 'edit'
|
||||
end
|
||||
end
|
||||
|
||||
def memberships
|
||||
end
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue