Thursday, June 28, 2012

Re: Routes vs Type checking for Action Parameters, best practice?

I disagree. I think you're not using routes in their purest form (to route stuff in the right way - rather than error trapping) and even if it passes you still need to check the validity in the controller and redirect if necessary. Why do that in two places? And what happens in the router if a non-integer is passed?

Jeremy Burns
Class Outfit

http://www.classoutfit.com

On 28 Jun 2012, at 12:58:36, Poyan Nabati wrote:

That's another type of error though. It's something have to handle in your application but I don't see the relation to my OP. 

--
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: