Re: Inflector bug or newbie mistake?

2006-08-15 Thread John Zimmerman [gmail]
Your controller needs to be plural.addresses_controller.phpclass AddressesController extends AppController{    var $name = "Addresses";}On 8/15/06, 
jbernat <[EMAIL PROTECTED]> wrote:
I am baking my first Cake app, and I created a controller named"address_controller.php" for a table named "addresses":class AddressController extends AppController{
var $name = 'Address';//var $scaffold;}?>I created a model called "address.php":class Address extends AppModel{var $name = 'Address';var $belongsTo = array('User' =>
   array('className'  => 'User', 'conditions' => '', 'order'  => '', 'foreignKey' => 'user_id'
   ) );}?>I attempt to access the URL .../address/add and get the following ModelNot Found error:Fatal: Unable to load model AddresFatal: Create Class:
class Addres extends AppModel{var $name = 'Addres';}?>in file : app\models\addres.phpWhy is it looking for addres.php with a class named 'Addres' instead of
address.php and 'Address'?Thanks in advance for your help!Jimhttp://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  -~--~~~~--~~--~--~---


Inflector bug or newbie mistake?

2006-08-15 Thread jbernat

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