the last years with cake <= 1.3 everybody simply redirected if a
record didnt exist

if (!$post) {
    //flash message (error)
    $this->redirect(...) // to previous url or default index etc
}

the 2.0 book proposes:

if (!$post) {
        throw new NotFoundException();
}

so are redirects "outdated"? should actions throw such exceptions if
only the id is wrong (deleted, wrong access, ...)?
does it hurt the usability to do so?

of course you could still use the former approach. just wondering what
the cons and pros are here.

-- 
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
[email protected] For more options, visit this group at 
http://groups.google.com/group/cake-php

Reply via email to