diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2007-01-28 17:51:21 +0000 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2007-01-28 17:51:21 +0000 |
commit | 16f6bd4070d57fc1eacb1a531385af205233a573 (patch) | |
tree | ea3781be6bcaa09ab34ba442e34f741b09ac34b4 /activerecord/lib/active_record | |
parent | e720ba0b5f40ca1714a9c59b74da8ab0a0d3e00e (diff) | |
download | rails-16f6bd4070d57fc1eacb1a531385af205233a573.tar.gz rails-16f6bd4070d57fc1eacb1a531385af205233a573.tar.bz2 rails-16f6bd4070d57fc1eacb1a531385af205233a573.zip |
SQLServer: don't choke on strings containing 'null'. Closes #7083.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6084 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/lib/active_record')
-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 92ac249fdf..e85a826942 100644 --- a/activerecord/lib/active_record/connection_adapters/sqlserver_adapter.rb +++ b/activerecord/lib/active_record/connection_adapters/sqlserver_adapter.rb @@ -73,7 +73,7 @@ module ActiveRecord end def type_cast(value) - return nil if value.nil? || value =~ /^\s*null\s*$/i + return nil if value.nil? case type when :datetime then cast_to_datetime(value) when :timestamp then cast_to_time(value) |