diff --git a/src/Listener/ViewListener.php b/src/Listener/ViewListener.php index 64659456..638ea3f0 100644 --- a/src/Listener/ViewListener.php +++ b/src/Listener/ViewListener.php @@ -333,10 +333,6 @@ protected function _controllerName() 'humanize', ]; - if ($this->_action()->scope() === 'table') { - $inflections[] = 'pluralize'; - } - if ($this->_action()->scope() === 'entity') { $inflections[] = 'singularize'; } @@ -484,7 +480,7 @@ protected function _associations(array $whitelist = []) $associationConfiguration[$type][$assocKey]['foreignKey'] = $association->foreignKey(); $associationConfiguration[$type][$assocKey]['propertyName'] = $association->property(); $associationConfiguration[$type][$assocKey]['plugin'] = null; - $associationConfiguration[$type][$assocKey]['controller'] = Inflector::pluralize($assocKey); + $associationConfiguration[$type][$assocKey]['controller'] = $assocKey; $associationConfiguration[$type][$assocKey]['entity'] = Inflector::singularize(Inflector::underscore($assocKey)); $associationConfiguration[$type][$assocKey]['entities'] = Inflector::underscore($assocKey);