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:
@@ -152,16 +152,16 @@ class UnitsController extends AppController {
|
||||
$this->redirect(array('action'=>''));
|
||||
}
|
||||
|
||||
$this->Unit->Behaviors->attach('Containable');
|
||||
$this->Unit->contain
|
||||
(array(// Models
|
||||
'UnitSize',
|
||||
'Lease' => array('Customer'),
|
||||
'CurrentLease' => array('Customer')
|
||||
)
|
||||
);
|
||||
$unit = $this->Unit->read(null, $id);
|
||||
$this->Unit->Behaviors->detach('Containable');
|
||||
$unit = $this->Unit->find
|
||||
('first',
|
||||
array('contain' =>
|
||||
array(// Models
|
||||
'UnitSize',
|
||||
'Lease' => array('Customer'),
|
||||
'CurrentLease' => array('Customer')
|
||||
),
|
||||
'conditions' => array('Unit.id' => $id),
|
||||
));
|
||||
|
||||
// Get the balance on each lease.
|
||||
foreach ($unit['Lease'] AS &$lease) {
|
||||
|
||||
Reference in New Issue
Block a user