Permalink
Browse files

make the patch work in updated modules

  • Loading branch information...
1 parent b1e4008 commit e3b9beb683f680d4d34f5b74798f46f1f4e47099 @keichii committed Feb 1, 2012
Showing with 3 additions and 4 deletions.
  1. +1 −2 lib/generators.js
  2. +1 −1 templates/config/environment.coffee
  3. +1 −1 templates/config/environment.js
View
@@ -334,8 +334,7 @@ exports.list = function () {
.replace(/\s+$/g, '')
.split('\n'),
firstLine = routes.shift();
-
- if (firstLine.match(/^exports\.routes = function \(map\) \{$/) && !routes.some(containRoute)) {
+ if (firstLine.match(/^exports\.routes = function \(map\) \{/) && !routes.some(containRoute)) {
routes.unshift(' map.resources(\'' + models + '\');');
routes.unshift(firstLine);
fs.writeFileSync(routesConfig, routes.join('\n'));
@@ -10,7 +10,7 @@ app.configure ->
app.use express.static(cwd + '/public', maxAge: 86400000)
app.use express.bodyParser()
- app.use express.cookieParser()
+ app.use express.cookieParser 'secret'
app.use express.session secret: 'secret'
app.use express.methodOverride()
app.use app.router
@@ -10,7 +10,7 @@ app.configure(function(){
app.set('jsDirectory', '/javascripts/');
app.set('cssDirectory', '/stylesheets/');
app.use(express.bodyParser());
- app.use(express.cookieParser());
+ app.use(express.cookieParser('secret'));
app.use(express.session({secret: 'secret'}));
app.use(express.methodOverride());
app.use(app.router);

0 comments on commit e3b9beb

Please sign in to comment.