Added the Containable behavior back into the AppModel, since it's obviously getting used in every controller.
git-svn-id: file:///svn-source/pmgr/branches/ledger_transactions_20090605@91 97e9348a-65ac-dc4b-aefc-98561f571b83
This commit is contained in:
@@ -65,16 +65,17 @@ class ContactsController extends AppController {
|
||||
$this->redirect(array('action'=>'index'));
|
||||
}
|
||||
|
||||
$this->Contact->Behaviors->attach('Containable');
|
||||
$this->Contact->contain
|
||||
(array(// Models
|
||||
'ContactPhone',
|
||||
'ContactEmail',
|
||||
'ContactAddress',
|
||||
'Customer')
|
||||
);
|
||||
$contact = $this->Contact->read(null, $id);
|
||||
$this->Contact->Behaviors->detach('Containable');
|
||||
$contact = $this->Contact->find
|
||||
('first', array
|
||||
('contain' => array
|
||||
(// Models
|
||||
'ContactPhone',
|
||||
'ContactEmail',
|
||||
'ContactAddress',
|
||||
'Customer'),
|
||||
|
||||
'conditions' => array('Contact.id' => $id),
|
||||
));
|
||||
|
||||
// Prepare to render.
|
||||
$title = $contact['Contact']['display_name'];
|
||||
|
||||
Reference in New Issue
Block a user