Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Only replace last :collection_id when collection: true set

  • Loading branch information...
commit 390a1fd312d2e8168cdd09a8e329069f79abf0bd 1 parent 1ddd479
@1602 authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/railway_routes.js
View
2  lib/railway_routes.js
@@ -124,7 +124,7 @@ Map.prototype.root = function (handler, middleware, options) {
options = {};
}
- path = options.collection ? path.replace(/\/:.*_id/, '') : path;
+ path = options.collection ? path.replace(/\/:[^\/\:]+_id(\/[^\:]+)$/, '$1') : path;
var args = [path];
if (middleware) {
Please sign in to comment.
Something went wrong with that request. Please try again.