mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
Adding and removing people
This commit is contained in:
parent
d95d8f234b
commit
3a2bf49f97
6 changed files with 64 additions and 28 deletions
|
|
@ -1,5 +1,6 @@
|
|||
class Admin::PeopleController < ApplicationController
|
||||
before_filter :verify_organizer
|
||||
respond_to :html
|
||||
|
||||
def index
|
||||
@people = Person.all
|
||||
|
|
@ -15,16 +16,28 @@ class Admin::PeopleController < ApplicationController
|
|||
end
|
||||
end
|
||||
|
||||
def create
|
||||
def new
|
||||
@person = Person.new
|
||||
end
|
||||
|
||||
def create
|
||||
@person = Person.new(params[:person])
|
||||
flash[:notice] = 'Person was successfully created.' if @person.save
|
||||
respond_with @person, :location => admin_people_path
|
||||
end
|
||||
|
||||
def show
|
||||
@person = Person.find(params[:id])
|
||||
end
|
||||
|
||||
def update
|
||||
def edit
|
||||
@person = Person.find(params[:id])
|
||||
end
|
||||
|
||||
def update
|
||||
@person = Person.find(params[:id])
|
||||
flash[:notice] = 'Person was successfully updated' if @person.update_attributes(params[:person])
|
||||
respond_with @person, :location => admin_people_path
|
||||
end
|
||||
|
||||
def delete
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue