Permalink
Browse files

Named class for routes collection

  • Loading branch information...
1 parent b803aca commit ef26185244951c6fc27a2e8bfe0d08c2c1fd34ab @1602 committed Feb 25, 2013
Showing with 6 additions and 3 deletions.
  1. +6 −3 lib/railway_routes.js
View
@@ -39,13 +39,16 @@ function Map(app, bridge) {
this.ns = '';
// wtf???
this.globPath = '/';
- this.pathTo = {};
+ this.pathTo = new RoutesCollection;
this.dump = [];
this.middlewareStack = [];
this.camelCaseHelperNames = false;
this.nestedRoutesOnCollection = false;
}
+function RoutesCollection() {
+}
+
/**
* Calculate url helper name for given path and action
*
@@ -111,12 +114,12 @@ Map.prototype.root = function (handler, middleware, options) {
if (!controller && this.latestResource) {
controller = this.latestResource;
} else if (!controller) {
- controller = 'controller';
+ // controller = 'controller';
}
if (!action && !subpath.match(/[:\/]/)) {
action = subpath;
} else if (!action) {
- action = 'action';
+ // action = 'action';
}
// only accept functions in before filter when it's an array

0 comments on commit ef26185

Please sign in to comment.