diff options
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/sqlserver_adapter.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/sqlserver_adapter.rb b/activerecord/lib/active_record/connection_adapters/sqlserver_adapter.rb index 0ce5f39421..1863a9be57 100644 --- a/activerecord/lib/active_record/connection_adapters/sqlserver_adapter.rb +++ b/activerecord/lib/active_record/connection_adapters/sqlserver_adapter.rb @@ -66,7 +66,7 @@ module ActiveRecord return nil if value.nil? || value =~ /^\s*null\s*$/i case type when :string then value - when :integer then value == true || value == false ? value == true ? '1' : '0' : value.to_i + when :integer then value == true || value == false ? value == true ? 1 : 0 : value.to_i when :float then value.to_f when :datetime then cast_to_datetime(value) when :timestamp then cast_to_time(value) |