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 b94361742..fc22e791b 100644 --- a/lib/Cake/Controller/Controller.php +++ b/lib/Cake/Controller/Controller.php @@ -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();