Skip to content

Commit

Permalink
Making sure the default model for controller is added to the request …
Browse files Browse the repository at this point in the history
…models parameter in render()
  • Loading branch information
lorenzo committed Jul 14, 2011
1 parent 37231b4 commit b16a5f2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/Cake/Controller/Controller.php
Expand Up @@ -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();
Expand Down

0 comments on commit b16a5f2

Please sign in to comment.