Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #211 from MiguelMadero/numberofoworkers

Number of Workers
  • Loading branch information...
commit 534d8917a23c1d5d02db21bac2625659e0cc80aa 2 parents c2e664a + 6edc07a
@larzconwell larzconwell authored
View
2  bin/cli.js
@@ -32,7 +32,7 @@ usage = [
, 'Options:'
, ' --environment, -e Environment to use'
, ' --port, -p Port to connect to'
- , ' --workers, -w Number of worker processes to start(Default: 2)'
+ , ' --workers, -w Number of worker processes to start (default: 1)'
, ' --debug, -d Sets the log level to output debug messages to'
, ' the console'
, ' --jade, -j When generating views this will create Jade'
View
2  site/tutorial.html
@@ -178,7 +178,7 @@ <h2 id="executable">Using the Geddy command</h2>
<ul>
<li><code>--environment</code>, <code>-e</code>: Environment to use</li>
<li><code>--port</code>, <code>-p</code>: Port to connect server to</li>
- <li><code>--workers</code>, <code>-w</code>: Number of workers to use(Default: 2)</li>
+ <li><code>--workers</code>, <code>-w</code>: Number of workers to use (default: 1)</li>
<li><code>--debug</code>, <code>-d</code>: Sets the log level to output debug messages to console</li>
<li><code>--jade</code>, <code>-j</code>: When generating views, use Jade templates(Default: EJS)</li>
<li><code>--handle</code>, <code>-H</code>: When generating views, use Handlebars templates(Default: EJS)</li>
View
18 templates/scaffold/controller.ejs
@@ -24,10 +24,12 @@ var <%= names.constructor.plural %> = function () {
, <%= names.property.singular %> = geddy.model.<%= names.constructor.singular %>.create(params);
<%= names.property.singular %>.save(function(err, data) {
- if(err) {
+ if (err) {
params.errors = err;
self.transfer('add');
- } else self.redirect({controller: self.name});
+ } else {
+ self.redirect({controller: self.name});
+ }
});
};
@@ -54,10 +56,12 @@ var <%= names.constructor.plural %> = function () {
<%= names.property.singular %>.updateAttributes(params);
<%= names.property.singular %>.save(function(err, data) {
- if(err) {
+ if (err) {
params.errors = err;
self.transfer('edit');
- } else self.redirect({controller: self.name});
+ } else {
+ self.redirect({controller: self.name});
+ }
});
});
};
@@ -66,10 +70,12 @@ var <%= names.constructor.plural %> = function () {
var self = this;
geddy.model.<%= names.constructor.singular %>.remove(params.id, function(err) {
- if(err) {
+ if (err) {
params.errors = err;
self.transfer('edit');
- } else self.redirect({controller: self.name});
+ } else {
+ self.redirect({controller: self.name});
+ }
});
};
<% } %>
Please sign in to comment.
Something went wrong with that request. Please try again.