Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix clone

  • Loading branch information...
commit eafa6f6f7dbd6e843dd6a28143e341fef0a00a4c 1 parent 8311bdb
@1602 authored
Showing with 9 additions and 7 deletions.
  1. +9 −7 lib/railway_routes.js
View
16 lib/railway_routes.js
@@ -50,13 +50,15 @@ function RoutesCollection(origin, prefix) {
var self = this;
if (origin) {
for (var name in origin) {
- this[name] = function() {
- var args = Array.prototype.slice.call(arguments);
- return '/' + prefix + origin[name].apply(origin, args);
- };
- this[name].toString = function() {
- return self[name]();
- };
+ (function(name) {
+ self[name] = function() {
+ var args = Array.prototype.slice.call(arguments);
+ return prefix + origin[name].apply(origin, args);
+ };
+ self[name].toString = function() {
+ return self[name]();
+ };
+ })(name);
}
}
}

1 comment on commit eafa6f6

@tomaash

You should fix the test as well.. Or maybe I can do it..

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