Added a function to delete events.

Currently this only allows single events to be deleted.
This commit is contained in:
Kyle Johnson 2013-09-14 22:05:08 -04:00
parent 0b5a215dca
commit bf2e46f512
1 changed files with 10 additions and 0 deletions

View File

@ -60,6 +60,16 @@ public function index() {
$this->set('event', $event); $this->set('event', $event);
} }
public function delete($id) {
if ($this->request->is('get')) {
throw new MethodNotAllowedException();
}
if ($this->Event->delete($id)) {
return $this->redirect(array('action' => 'index'));
}
}
} }
?> ?>