Fix SiteSetingExtension specs to coerce int to string.

This commit is contained in:
Guo Xiang Tan
2017-07-24 22:54:42 +09:00
parent 0ab0c82f11
commit e82efc7b03
2 changed files with 2 additions and 1 deletions

View File

@@ -284,6 +284,8 @@ module SiteSettingExtension
def add_override!(name, val)
type = get_data_type(name, defaults[name.to_sym])
val = val.to_s if type == types[:string]
if type == types[:bool] && val != true && val != false
val = (val == "t" || val == "true") ? 't' : 'f'
end