diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2006-06-04 00:37:47 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2006-06-04 00:37:47 +0000 |
commit | 100b994d90a819d5dd97c0f07bb40b78c489e4e1 (patch) | |
tree | 161348ebb1994c9bc336c0de201fdf619b123ea4 /activesupport | |
parent | 2e65e8ccc68c56607fb86f6668d4f886165ace5e (diff) | |
download | rails-100b994d90a819d5dd97c0f07bb40b78c489e4e1.tar.gz rails-100b994d90a819d5dd97c0f07bb40b78c489e4e1.tar.bz2 rails-100b994d90a819d5dd97c0f07bb40b78c489e4e1.zip |
Added binary formatting
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4432 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activesupport')
-rw-r--r-- | activesupport/lib/active_support/core_ext/hash/conversions.rb | 3 |
1 files changed, 2 insertions, 1 deletions
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 = {}) |