aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2005-04-07 06:44:33 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2005-04-07 06:44:33 +0000
commit8afc284e2c3e0a34a211fc778b880af20d3d0973 (patch)
tree9a333f0cd81da066cae8e446ba33b2c778fd077c
parent1a22fb59c944aee70c968688dc0440596670076b (diff)
downloadrails-8afc284e2c3e0a34a211fc778b880af20d3d0973.tar.gz
rails-8afc284e2c3e0a34a211fc778b880af20d3d0973.tar.bz2
rails-8afc284e2c3e0a34a211fc778b880af20d3d0973.zip
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
-rwxr-xr-xactiverecord/lib/active_record/connection_adapters/abstract_adapter.rb2
1 files changed, 1 insertions, 1 deletions
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