function delete($id = null) {
if (!$id) {
$this->Session->setFlash(__('Invalid id for Contact', true));
$this->redirect(array('action'=>'index'));
}
if ($this->Contact->del($id)) {
$this->Session->setFlash(__('Contact deleted', true));
$this->redirect(array('action'=>'index'));
}
}
On 7 Sep, 23:23, seanislegend <boredofm...@googlemail.com> wrote:
> Hey,
> after I delete from a DB something I want to set a Flash message
> saying if it's successfully been deleted or if there was an error.
> I'm not sure how to implement this with afterDelete. Any ideas?
> Thanks.