Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Make sure appendFormat is always

When calling resources(name,actions) (so skipping the params parameter which seems to be supported), appendFormat is not set.
It should be done after the test on params for a function.
  • Loading branch information...
commit b7e48d6d540885678f61e8bacbfd08af7fb2bcce 1 parent ad9c84d
Jean-Francois Remy jfremy authored
Showing with 2 additions and 1 deletion.
  1. +2 −1  lib/railway_routes.js
3  lib/railway_routes.js
View
@@ -227,13 +227,14 @@ Map.prototype.resources = function (name, params, actions) {
var self = this;
// params are optional
params = params || {};
- params.appendFormat = ('appendFormat' in params) ? params.appendFormat : true;
// if params arg omitted, second arg may be `actions`
if (typeof params == 'function') {
actions = params;
params = {};
}
+
+ params.appendFormat = ('appendFormat' in params) ? params.appendFormat : true;
// If resource uses the path param, it's subroutes should be
// prefixed by path, not the resource's name
Please sign in to comment.
Something went wrong with that request. Please try again.