Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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
  • Loading branch information...
commit df7a087c764013f2d36edbc9746b57ca2ac8d93f 1 parent c91088c
@jeremy jeremy authored
View
2  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]
View
1  activerecord/lib/active_record/connection_adapters/oci_adapter.rb
@@ -110,6 +110,7 @@ def simplified_type(field_type)
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
Please sign in to comment.
Something went wrong with that request. Please try again.