Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge branch 'master' of github.com:1602/railway-routes

  • Loading branch information...
commit 17fc77056773cb50f50646e3c9f10f6bff92201e 2 parents bf75032 + 3ec283c
Anatoliy Chakkaev authored
Showing with 3 additions and 2 deletions.
  1. +3 −2 lib/railway_routes.js
5 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
@@ -264,7 +265,7 @@ Map.prototype.resources = function (name, params, actions) {
var path = route[1];
// append format
- if (params.appendFormat) {
+ if (params.appendFormat !== false) {
if (path == '/') {
path = '.:format?';
} else {
Please sign in to comment.
Something went wrong with that request. Please try again.