From 8afc284e2c3e0a34a211fc778b880af20d3d0973 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Thu, 7 Apr 2005 06:44:33 +0000 Subject: Fixed check_box with postgresql booleans is more work now again #995 git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1109 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- activerecord/lib/active_record/connection_adapters/abstract_adapter.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb b/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb index b6555c2ee2..b9a447152f 100755 --- a/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb +++ b/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb @@ -186,7 +186,7 @@ module ActiveRecord when :time then string_to_dummy_time(value) when :date then string_to_date(value) when :binary then binary_to_string(value) - when :boolean then value == true or value =~ /^t(rue)?$/i or value.to_s == '1' + when :boolean then value == true or (value =~ /^t(rue)?$/i) == 0 or value.to_s == '1' else value end end -- cgit v1.2.3