Browse Source

Set idName correctly when using nested routes and dasherize

Andrew LeCody 10 years ago
parent
commit
f79782b946
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/Routing/RouteBuilder.php

+ 1 - 1
src/Routing/RouteBuilder.php

@@ -344,7 +344,7 @@ class RouteBuilder
         }
 
         if (is_callable($callback)) {
-            $idName = Inflector::singularize($urlName) . '_id';
+            $idName = Inflector::underscore(Inflector::singularize($name)) . '_id';
             $path = '/' . $urlName . '/:' . $idName;
             $this->scope($path, [], $callback);
         }