Skip to content

Commit

Permalink
Merge branch 'master' into extending_template_engine_support
Browse files Browse the repository at this point in the history
  • Loading branch information
larzconwell committed Jun 19, 2012
2 parents d6f37e7 + eb95c15 commit 9ab5a2c
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion bin/cli.js
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ usage = ''
+ '{Usage}: geddy [options]\n' + '{Usage}: geddy [options]\n'
+ '\n' + '\n'
+ '{Options}:\n' + '{Options}:\n'
+ ' -e, --environment Environment config to use\n' + ' -e, --environment Evironment config to use\n'
+ ' -p, --port NUM Port number, defaults to 4000\n' + ' -p, --port NUM Port number, defaults to 4000\n'
+ ' -n, --workers NUM Number of worker processes to use, defaults to 2\n' + ' -n, --workers NUM Number of worker processes to use, defaults to 2\n'
+ ' -V/v, --version Outputs the version of geddy that you have installed\n' + ' -V/v, --version Outputs the version of geddy that you have installed\n'
Expand Down
2 changes: 1 addition & 1 deletion lib/model/adapters/mongo.js
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ var Mongo = function (config) {
instance = geddy.model[this.model].create(cleanInstance); instance = geddy.model[this.model].create(cleanInstance);


if (!instance.isValid()) { if (!instance.isValid()) {
return callback(instace.errors, null); return callback(instance.errors, null);
} }


// Check to see if we have this to do item already // Check to see if we have this to do item already
Expand Down
5 changes: 3 additions & 2 deletions lib/model/index.js
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -192,11 +192,12 @@ utils.mixin(model, new (function () {
var obj = {} var obj = {}
, createAPIMethod = function (method) { , createAPIMethod = function (method) {
return function () { return function () {
var adapt;
if (!model.adapter) { if (!model.adapter) {
throw new Error('geddy.model.adapter is not defined.'); throw new Error('geddy.model.adapter is not defined.');
} }
return model.adapter[name][method].apply(model.adapter, adapt = model.adapter[name];
arguments); return adapt[method].apply(adapt, arguments);
}; };
}; };


Expand Down
1 change: 1 addition & 0 deletions test/model_create_user.js
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ geddy.model = model;
var User = function () { var User = function () {
this.property('login', 'string', {required: true}); this.property('login', 'string', {required: true});
this.property('password', 'string', {required: true}); this.property('password', 'string', {required: true});
this.property('confirmPassword', 'string', {required: true});
this.property('lastName', 'string'); this.property('lastName', 'string');
this.property('firstName', 'string'); this.property('firstName', 'string');


Expand Down

0 comments on commit 9ab5a2c

Please sign in to comment.