Skip to content

Commit

Permalink
Changing new Model() for ClassRegistry::init(). Fixes issues when bak…
Browse files Browse the repository at this point in the history
…ing admin and non-admin methods for a controller that uses bound translations + TranslateBehavior. Fixes #245
  • Loading branch information
markstory committed Nov 12, 2009
1 parent a7a6dc8 commit 38f5781
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cake/console/libs/tasks/controller.php
Expand Up @@ -252,7 +252,7 @@ function bakeActions($controllerName, $admin = null, $wannaUseSession = true) {
exit;
}
$actions = null;
$modelObj =& new $currentModelName();
$modelObj =& ClassRegistry::init($currentModelName);
$controllerPath = $this->_controllerPath($controllerName);
$pluralName = $this->_pluralName($currentModelName);
$singularName = Inflector::variable($currentModelName);
Expand Down

0 comments on commit 38f5781

Please sign in to comment.