My delete code inside notes_controller.php is: ... this is quite similar to what you gave, isn't it? You can see by yourself . Login to http://jeeremie.com with u: username / p: demo123 and try to delete a note.
-- function delete($id) {
if (!$id) {
$this->Session->setFlash('Invalid id for note', 'flash_error');
$this->redirect(array('action'=>'index'));
}
if ($this->Note->delete($id)) {
$this->Session->setFlash('Your note has been deleted', 'flash_success');
$this->redirect(array('action'=>'index'));
}
$this->Session->setFlash('Oops! Something went wrong. Your note was not deleted. Try again!', 'flash_error');
$this->redirect(array('action' => 'index'));
}
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php

No comments:
Post a Comment