Permalink
Browse files

rename getParamValuesFromRequest to bindRouteParametersToRequest

remove unneeded local variable in respond
  • Loading branch information...
nrstott committed Feb 6, 2013
1 parent b6f8a9c commit b2750fed26460420a64d0c09f0c9f1107697437a
Showing with 3 additions and 4 deletions.
  1. +3 −4 lib/router.js
View
@@ -181,14 +181,13 @@ Router.prototype.respond = function(reqPromise) {
var self = this;
return when(reqPromise, function(req) {
- var route = self.handler(req.method, req.pathInfo)
- , routeParamValues = null;
+ var route = self.handler(req.method, req.pathInfo);
if (util.no(route)) {
return null;
}
- routeParamValues = route.getParamValuesFromRequest(req);
+ route.bindRouteParametersToRequest(req);
/* Invoke all 'before' functions and save any promises. */
var promiseArray = [];
@@ -279,7 +278,7 @@ function thenResolve(val) {
function makeRoute(proto) {
return Object.create(proto, {
- getParamValuesFromRequest: {
+ bindRouteParametersToRequest: {
value: function(req) {
var route = this
, routeParamValues = route.path.exec(req.pathInfo);

0 comments on commit b2750fe

Please sign in to comment.