From b16a5f24dba36c9b0404688f18ed5451ffaab057 Mon Sep 17 00:00:00 2001 From: Jose Lorenzo Rodriguez Date: Thu, 14 Jul 2011 18:06:16 -0430 Subject: [PATCH] Making sure the default model for controller is added to the request models parameter in render() --- lib/Cake/Controller/Controller.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/Cake/Controller/Controller.php b/lib/Cake/Controller/Controller.php index b9436174215..fc22e791b4a 100644 --- a/lib/Cake/Controller/Controller.php +++ b/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();