Making sure the default model for controller is added to the request models parameter in render()

This commit is contained in:
Jose Lorenzo Rodriguez 2011-07-14 18:06:16 -04:30
parent 37231b4ce6
commit b16a5f24db

View file

@ -811,6 +811,8 @@ class Controller extends Object {
list($plugin, $className) = pluginSplit($model);
$this->request->params['models'][$model] = compact('plugin', 'className');
}
} if ($this->uses === false || $this->uses === array()) {
$this->request->params['models'][$this->modelClass] = array('plugin' => $this->plugin, 'className' => $this->modelClass);
}
$models = ClassRegistry::keys();