不要怂,就是干,撸起袖子干!

Commit 74ae10c2 by Sascha Depold

better option mergeing

1 parent 09826a60
Showing with 4 additions and 2 deletions
...@@ -6,8 +6,10 @@ module.exports = (function() { ...@@ -6,8 +6,10 @@ module.exports = (function() {
var ModelFactory = function(name, attributes, options) { var ModelFactory = function(name, attributes, options) {
var self = this var self = this
this.options = options || {} this.options = Utils._.extend({
this.options.timestamps = this.options.hasOwnProperty('timestamps') ? this.options.timestamps : true timestamps: true
}, options || {})
this.name = name this.name = name
this.tableName = this.options.freezeTableName ? name : Utils.pluralize(name) this.tableName = this.options.freezeTableName ? name : Utils.pluralize(name)
this.attributes = Utils.simplifyAttributes(attributes) this.attributes = Utils.simplifyAttributes(attributes)
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!