Permalink
Browse files

Merge remote-tracking branch '1602/master'

  • Loading branch information...
2 parents 693c35a + 2807e1e commit ebbabd57189f2803c2b5c80c6d859c2be94568be @olalonde olalonde committed Nov 26, 2012
Showing with 41 additions and 1 deletion.
  1. +39 −0 CHANGELOG.md
  2. +2 −1 lib/railway_routes.js
View
@@ -0,0 +1,39 @@
+## 0.0.8
+
+### Added sub-apps support
+
+Now path helpers inside nested apps returns correct urls:
+
+ // bundle express app as nested
+ app.use('/nested', nestedApp);
+ // was
+ nestedAppRoutes.paths.someRoute() // /some/route
+ // now
+ nestedAppRoutes.paths.someRoute() // /nested/some/route
+
+### Singleton resources
+
+by Olivier Lalonde, adds map.resource:
+
+Example:
+
+ map.resource('account');
+
+### Additional param to disable appending ".format?"
+
+by Olivier Lalonde:
+
+ map.resource('users' , { path: ':username', appendFormat: false });
+
+Will generate the following routes:
+
+ GET /account account#show
+ POST /account account#create
+ GET /account/new account#new
+ GET /account/edit account#edit
+ DELETE /account account#destroy
+ PUT /account account#update
+
+## 0.0.7
+
+Support modular railway
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

0 comments on commit ebbabd5

Please sign in to comment.