Permalink
Browse files

Added binary formatting

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4432 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
1 parent 2e65e8c commit 100b994d90a819d5dd97c0f07bb40b78c489e4e1 @dhh dhh committed Jun 4, 2006
Showing with 2 additions and 1 deletion.
  1. +2 −1 activesupport/lib/active_support/core_ext/hash/conversions.rb
@@ -16,7 +16,8 @@ module Conversions
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 = {})

0 comments on commit 100b994

Please sign in to comment.