Renaming default to defaultValue as default is reserved

This commit is contained in:
Hannah Wolfe 2013-09-14 22:39:31 +01:00
parent 9fcc0a6ed6
commit b902f8109c
2 changed files with 13 additions and 13 deletions

View File

@ -1,44 +1,44 @@
{
"core": {
"databaseVersion": {
"default": "000"
"defaultValue": "000"
}
},
"blog": {
"title": {
"default": "Ghost"
"defaultValue": "Ghost"
},
"description": {
"default": "Just a blogging platform."
"defaultValue": "Just a blogging platform."
},
"email": {
"default": "ghost@example.com",
"defaultValue": "ghost@example.com",
"validations": {
"notNull": true,
"isEmail": true
}
},
"logo": {
"default": ""
"defaultValue": ""
},
"cover": {
"default": ""
"defaultValue": ""
},
"defaultLang": {
"default": "en_US",
"defaultValue": "en_US",
"validations": {
"notNull": true
}
},
"postsPerPage": {
"default": "6",
"defaultValue": "6",
"validations": {
"notNull": true,
"isNumeric": true
}
},
"forceI18n": {
"default": "true",
"defaultValue": "true",
"validations": {
"notNull": true,
"isIn": ["true", "false"]
@ -47,15 +47,15 @@
},
"theme": {
"activePlugins": {
"default": ""
"defaultValue": ""
},
"activeTheme": {
"default": "casper"
"defaultValue": "casper"
}
},
"plugin": {
"installedPlugins": {
"default": "[]"
"defaultValue": "[]"
}
}
}

View File

@ -109,7 +109,7 @@ Settings = GhostBookshelf.Model.extend({
_.each(defaultSettings, function (defaultSetting, defaultSettingKey) {
var isMissingFromDB = usedKeys.indexOf(defaultSettingKey) === -1;
if (isMissingFromDB) {
defaultSetting.value = defaultSetting.default;
defaultSetting.value = defaultSetting.defaultValue;
insertOperations.push(Settings.forge(defaultSetting).save());
}
});