1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Added binary formatting

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4432 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
David Heinemeier Hansson 2006-06-04 00:37:47 +00:00
parent 2e65e8ccc6
commit 100b994d90

View file

@ -16,7 +16,8 @@ module ActiveSupport #:nodoc:
XML_FORMATTING = {
"date" => Proc.new { |date| date.to_s(:db) },
"datetime" => Proc.new { |time| time.xmlschema }
"datetime" => Proc.new { |time| time.xmlschema },
"binary" => Proc.new { |binary| Base64.encode64(binary) }
}
def to_xml(options = {})