Browse Source

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

Jose Lorenzo Rodriguez 14 years ago
parent
commit
b16a5f24db
1 changed files with 2 additions and 0 deletions
  1. 2 0
      lib/Cake/Controller/Controller.php

+ 2 - 0
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();