Skip to content

Commit

Permalink
Allow model settings to be set from config.
Browse files Browse the repository at this point in the history
  • Loading branch information
mde committed Mar 13, 2012
1 parent 7070acc commit fe9dc60
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
4 changes: 4 additions & 0 deletions lib/app.js
Expand Up @@ -77,6 +77,10 @@ var App = function () {
// Load models
// ==================
, _registerModels = function (next) {

// Set any model properties set in the config
geddy.mixin(geddy.model, geddy.config.model);

var modelDir = 'app/models'
, dirList
, item;
Expand Down
7 changes: 6 additions & 1 deletion lib/base_config.js
Expand Up @@ -46,6 +46,11 @@ config = {
}
// Default to no SSL setup
, ssl: null
};
// Model defaults
, model: {
useTimestamps: false
, forceCamel: true
}
};

module.exports = config;

0 comments on commit fe9dc60

Please sign in to comment.