I am working on Cake 2.4 and if i debug $this in my controller, then $this->Model is not set but should.
Controller: CustomersController(.php)
Model: CustomerModel(.php)
Since the naming Conventions are right, i have no clue where the issue is be located.
RELEVANT Code:
Customer.php:
<?php
class Customer extends Shop {
public $validate = array(/* ... */);
protected $_schema = array(/* ... */);
public function beforeSave($options = array()) {
parent::beforeSave($options);
}
}
CustomersController.php:
<?php
App::uses('ShopsController', 'Controller');
class CustomersController extends ShopsController {
public function beforeFilter() {
$this->Auth->allow('login');
parent::beforeFilter();
}
}