Inflector bug or newbie mistake?
I am baking my first Cake app, and I created a controller named "address_controller.php" for a table named "addresses": I created a model called "address.php": array('className' => 'User', 'conditions' => '', 'order' => '', 'foreignKey' => 'user_id' ) ); } ?> I attempt to access the URL .../address/add and get the following Model Not Found error: Fatal: Unable to load model Addres Fatal: Create Class: in file : app\models\addres.php Why is it looking for addres.php with a class named 'Addres' instead of address.php and 'Address'? Thanks in advance for your help! Jim http://www.photips.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: NEWBIE QUESTION: code continues executing after this->redirect()?
Thanks to all for the helpful responses. Adding exit(0) fixed my problem, and I will also consider a return. Jim http://www.biochartonline.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
NEWBIE QUESTION: code continues executing after this->redirect()?
I am new to PHP and Cake. I am baking my first website with Cake and have implemented authentication as per the manual at http://manual.cakephp.org/chapter/19 . I added the call to CheckSession() to each of the methods in my controller that require authentication, but noticed that even if the person is not logged in, the method executes. Upon stepping through the code, I noticed that the this->redirect() which forwards them to the login page falls through and the code after resumes executing. Is this as you would expect? I was expecting it would behave like an ASP Response.Redirect() which terminates the current script. If I wish to abandon all further method execution, what do I need to call or execute following this->redirect()? Many thanks! Jim Bernatowicz http://www.photips.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---