From df7a087c764013f2d36edbc9746b57ca2ac8d93f Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Thu, 10 Nov 2005 06:56:01 +0000 Subject: Don't cast nil or empty strings to a dummy date. Closes #2789. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2966 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- activerecord/CHANGELOG | 2 ++ activerecord/lib/active_record/connection_adapters/oci_adapter.rb | 1 + 2 files changed, 3 insertions(+) (limited to 'activerecord') diff --git a/activerecord/CHANGELOG b/activerecord/CHANGELOG index 8dd92a1e8b..33e3dafd14 100644 --- a/activerecord/CHANGELOG +++ b/activerecord/CHANGELOG @@ -1,5 +1,7 @@ *SVN* +* Don't cast nil or empty strings to a dummy date. #2789 [Rick Bradley ] + * acts_as_list plays nicely with inheritance by remembering the class which declared it. #2811 [rephorm@rephorm.com] * Fix sqlite adaptor's detection of missing dbfile or database declaration. [Nicholas Seckar] diff --git a/activerecord/lib/active_record/connection_adapters/oci_adapter.rb b/activerecord/lib/active_record/connection_adapters/oci_adapter.rb index 9f94df7277..bdbf6b2e5d 100644 --- a/activerecord/lib/active_record/connection_adapters/oci_adapter.rb +++ b/activerecord/lib/active_record/connection_adapters/oci_adapter.rb @@ -110,6 +110,7 @@ begin def cast_to_date_or_time(value) return value if value.is_a? Date + return nil if value.blank? guess_date_or_time (value.is_a? Time) ? value : cast_to_time(value) end -- cgit v1.2.3