On second thoughts, I would do this:
function __construct( ) {
parent::__construct();
if (!in_array('Category', $this->uses)) {
$this->uses[] = 'Category';
$this->Category = new Category;
}
}
Otherwise, for controllers that don't have a value defined for uses,
they will only have a Category model rather than their own model plus a
category.
HTH,
AD7six
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~----------~----~----~----~------~----~------~--~---