From c6e5e3acd2f44f40bc8a19cd110a57cd2c285476 Mon Sep 17 00:00:00 2001
From: nverba <distantstate@gmail.com>
Date: Wed, 27 Feb 2013 16:19:09 +0000
Subject: [PATCH] Quick fix for Boolean SiteSettings
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

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. 
---
 lib/site_setting_extension.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/site_setting_extension.rb b/lib/site_setting_extension.rb
index b29a6a7c5..5d78c224d 100644
--- a/lib/site_setting_extension.rb
+++ b/lib/site_setting_extension.rb
@@ -144,7 +144,7 @@ module SiteSettingExtension
     type = get_data_type(defaults[name])
 
     if type == Types::Bool && val != true && val != false
-      val = (val == "t" || val == "true")
+      val = (val == "t" || val == "true") ? 't' : 'f'
     end
 
     if type == Types::Fixnum && !(Fixnum === val)