Applying patches from 'wals' to fix uses where incorrect parameters were being passed into methods, and making methods match their documentation blocks. Fixes #668

This commit is contained in:
Mark Story 2010-05-10 23:58:22 -04:00
parent ec10a01504
commit 96d0119abc
2 changed files with 4 additions and 4 deletions

View file

@ -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';
}
/**

View file

@ -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',