Skip to content
Browse files

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
  • Loading branch information...
1 parent 1a22fb5 commit 8afc284e2c3e0a34a211fc778b880af20d3d0973 @dhh dhh committed Apr 7, 2005
Showing with 1 addition and 1 deletion.
  1. +1 −1 activerecord/lib/active_record/connection_adapters/abstract_adapter.rb
View
2 activerecord/lib/active_record/connection_adapters/abstract_adapter.rb
@@ -186,7 +186,7 @@ def type_cast(value)
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

0 comments on commit 8afc284

Please sign in to comment.
Something went wrong with that request. Please try again.