Skip to content
Browse files

Do not pluralize all actions with 0 arguments by definition

Fixes a regression introduced in 7a6f101.
  • Loading branch information...
1 parent d430323 commit 93564df46d4f32b9031afd7f9cc57c0a71a6fc04 @asm89 asm89 committed Sep 18, 2012
Showing with 3 additions and 1 deletion.
  1. +3 −1 Routing/Loader/Reader/RestActionReader.php
View
4 Routing/Loader/Reader/RestActionReader.php
@@ -342,7 +342,9 @@ private function generateUrlParts(array $resources, array $arguments, $httpMetho
$urlParts[] = '{'.$arguments[$i]->getName().'}';
}
} elseif (null !== $resource) {
- if (0 === count($arguments) || 'new' === $httpMethod) {
+ if ((0 === count($arguments) && !in_array($httpMethod, $this->availableHTTPMethods))
+ || 'new' === $httpMethod
+ ) {
$urlParts[] = Pluralization::pluralize(strtolower($resource));
} else {
$urlParts[] = strtolower($resource);

0 comments on commit 93564df

Please sign in to comment.
Something went wrong with that request. Please try again.