Permalink
Browse files

Making sure the default model for controller is added to the request …

…models parameter in render()
  • Loading branch information...
1 parent 37231b4 commit b16a5f24dba36c9b0404688f18ed5451ffaab057 @lorenzo lorenzo committed Jul 14, 2011
Showing with 2 additions and 0 deletions.
  1. +2 −0 lib/Cake/Controller/Controller.php
@@ -811,6 +811,8 @@ public function render($view = null, $layout = null) {
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();

0 comments on commit b16a5f2

Please sign in to comment.