diff --git a/cake/console/libs/shell.php b/cake/console/libs/shell.php index b736a64d7..65333f01d 100644 --- a/cake/console/libs/shell.php +++ b/cake/console/libs/shell.php @@ -570,14 +570,14 @@ class Shell extends Object { } /** - * Creates the proper singular model key for associations + * Creates the proper underscored model key for associations * - * @param string $name Controller class name + * @param string $name Model class name * @return string Singular model key * @access protected */ function _modelKey($name) { - return Inflector::underscore(Inflector::singularize($name)) . '_id'; + return Inflector::underscore($name) . '_id'; } /** diff --git a/cake/console/libs/tasks/controller.php b/cake/console/libs/tasks/controller.php index 62bcb7660..36fd91600 100644 --- a/cake/console/libs/tasks/controller.php +++ b/cake/console/libs/tasks/controller.php @@ -287,7 +287,7 @@ class ControllerTask extends BakeTask { $controllerPath = $this->_controllerPath($controllerName); $pluralName = $this->_pluralName($currentModelName); $singularName = Inflector::variable($currentModelName); - $singularHumanName = $this->_singularHumanName($currentModelName); + $singularHumanName = $this->_singularHumanName($controllerName); $pluralHumanName = $this->_pluralName($controllerName); $this->Template->set(compact('admin', 'controllerPath', 'pluralName', 'singularName', 'singularHumanName',