Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Allow model settings to be set from config.

  • Loading branch information...
commit fe9dc60c26e4df170e0348dfa8fa92871a467e60 1 parent 7070acc
@mde mde authored
Showing with 10 additions and 1 deletion.
  1. +4 −0 lib/app.js
  2. +6 −1 lib/base_config.js
View
4 lib/app.js
@@ -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;
View
7 lib/base_config.js
@@ -46,6 +46,11 @@ config = {
}
// Default to no SSL setup
, ssl: null
- };
+// Model defaults
+, model: {
+ useTimestamps: false
+ , forceCamel: true
+ }
+};
module.exports = config;
Please sign in to comment.
Something went wrong with that request. Please try again.