diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2005-11-10 06:56:01 +0000 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2005-11-10 06:56:01 +0000 |
commit | df7a087c764013f2d36edbc9746b57ca2ac8d93f (patch) | |
tree | 53df628024375f380b6cfd3da37938fd0dd26601 | |
parent | c91088cd135b797048f179423158713c4459e556 (diff) | |
download | rails-df7a087c764013f2d36edbc9746b57ca2ac8d93f.tar.gz rails-df7a087c764013f2d36edbc9746b57ca2ac8d93f.tar.bz2 rails-df7a087c764013f2d36edbc9746b57ca2ac8d93f.zip |
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
-rw-r--r-- | activerecord/CHANGELOG | 2 | ||||
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/oci_adapter.rb | 1 |
2 files changed, 3 insertions, 0 deletions
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 <rick@rickbradley.com>] + * 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 |