Skip to content

Commit c6e5e3a

Browse files
committed
Quick fix for Boolean SiteSettings
Boolean SiteSettings are saved as 't' or 'f' on create!, but are being saved as 1 or 0 after update. This quick fix maintains consistency, allowing boolean values to be updated and saved. 
1 parent 0f77026 commit c6e5e3a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/site_setting_extension.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ def add_override!(name,val)
144144
type = get_data_type(defaults[name])
145145

146146
if type == Types::Bool && val != true && val != false
147-
val = (val == "t" || val == "true")
147+
val = (val == "t" || val == "true") ? 't' : 'f'
148148
end
149149

150150
if type == Types::Fixnum && !(Fixnum === val)

0 commit comments

Comments
 (0)