Permalink
Browse files

1-2-stable: changing the :default Date format doesn't break date quot…

…ing. Closes #6312.

git-svn-id: http://svn-commit.rubyonrails.org/rails/branches/1-2-stable@7012 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
jeremy committed Jun 13, 2007
1 parent 5c6a0d5 commit 2ba886478206dd5e55d910031a3f886e11e52943
View
@@ -1,6 +1,8 @@
*SVN*
-* Allow nil serialized attributes with a set class constraint. #7293 [sandofsky]
+* Changing the :default Date format doesn't break date quoting. #6312 [bshand, Elias]
+
+* Allow nil serialized attributes with a set class constraint. #7293 [sandofsky]
* belongs_to assignment creates a new proxy rather than modifying its target in-place. #8412 [mmangino@elevatedrails.com]
@@ -24,7 +24,7 @@ def quote(value, column = nil)
when Float, Fixnum, Bignum then value.to_s
# BigDecimals need to be output in a non-normalized form and quoted.
when BigDecimal then value.to_s('F')
- when Date then "'#{value.to_s}'"
+ when Date then "'#{value.to_s(:db)}'"
when Time, DateTime then "'#{quoted_date(value)}'"
else "'#{quote_string(value.to_yaml)}'"
end

0 comments on commit 2ba8864

Please sign in to comment.