diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2005-04-02 08:58:43 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2005-04-02 08:58:43 +0000 |
commit | 5b36c9275d979c40c7e20e9cc0415d4e8dbfd457 (patch) | |
tree | 5c027eae829c383d8c5ddbce63d1b27855958198 /activerecord/lib | |
parent | ce96c5b30b52a1b2d1628d6e605e7989f9eea023 (diff) | |
download | rails-5b36c9275d979c40c7e20e9cc0415d4e8dbfd457.tar.gz rails-5b36c9275d979c40c7e20e9cc0415d4e8dbfd457.tar.bz2 rails-5b36c9275d979c40c7e20e9cc0415d4e8dbfd457.zip |
Fixed boolean queries for t/f fields in PostgreSQL #995 [dave@cherryville.org]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1066 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/lib')
-rwxr-xr-x | activerecord/lib/active_record/connection_adapters/abstract_adapter.rb | 2 |
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 1176b12cbf..b6555c2ee2 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 == "t" or value == true ? true : false) + when :boolean then value == true or value =~ /^t(rue)?$/i or value.to_s == '1' else value end end |