From 100b994d90a819d5dd97c0f07bb40b78c489e4e1 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Sun, 4 Jun 2006 00:37:47 +0000 Subject: Added binary formatting git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4432 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- activesupport/lib/active_support/core_ext/hash/conversions.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'activesupport/lib') diff --git a/activesupport/lib/active_support/core_ext/hash/conversions.rb b/activesupport/lib/active_support/core_ext/hash/conversions.rb index 7e843cb7dc..a3270c31ef 100644 --- a/activesupport/lib/active_support/core_ext/hash/conversions.rb +++ b/activesupport/lib/active_support/core_ext/hash/conversions.rb @@ -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 = {}) -- cgit v1.2.3