Skip to content

Commit

Permalink
Merge pull request #130 from FriendsOfCake/fix-double-pluralization
Browse files Browse the repository at this point in the history
Fix double pluralization.
  • Loading branch information
ADmad committed Jun 5, 2016
2 parents 0794fa1 + 191d5df commit 6b261cd
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/Listener/ViewListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -333,10 +333,6 @@ protected function _controllerName()
'humanize',
];

if ($this->_action()->scope() === 'table') {
$inflections[] = 'pluralize';
}

if ($this->_action()->scope() === 'entity') {
$inflections[] = 'singularize';
}
Expand Down Expand Up @@ -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);

Expand Down

0 comments on commit 6b261cd

Please sign in to comment.