Permalink
Browse files

Fix a bug where all the routes from the second controller onwards were

incorrectly connected.
  • Loading branch information...
bar committed Mar 10, 2014
1 parent a2221cc commit aa36fe180fcec9b8069eaca88b2cf38b103a9bf1
Showing with 3 additions and 4 deletions.
  1. +3 −4 src/Routing/Router.php
View
@@ -467,12 +467,11 @@ public static function mapResources($controller, $options = array()) {
if ($prefix) {
$params['prefix'] = $prefix;
}
- $options = array(
+ $routeOptions = array_merge(array(
'id' => $options['id'],
'pass' => array('id')
- );
- $options = array_merge($options, $connectOptions);
- Router::connect($url, $params, $options);
+ ), $connectOptions);
+ Router::connect($url, $params, $routeOptions);
}
static::$_resourceMapped[] = $urlName;
}

0 comments on commit aa36fe1

Please sign in to comment.