diff options
Diffstat (limited to 'activerecord/lib/active_record')
-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 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 |