diff options
author | Pratik Naik <pratiknaik@gmail.com> | 2008-10-05 22:16:26 +0100 |
---|---|---|
committer | Pratik Naik <pratiknaik@gmail.com> | 2008-10-05 22:16:26 +0100 |
commit | a2932784bb71e72a78c32819ebd7ed2bed551e3e (patch) | |
tree | 99bfd589a48153e33f19ae72baa6e98f5708a9b8 /activesupport/lib/active_support/core_ext/base64/encoding.rb | |
parent | 4df45d86097efbeabceecfe53d8ea2da9ccbb107 (diff) | |
download | rails-a2932784bb71e72a78c32819ebd7ed2bed551e3e.tar.gz rails-a2932784bb71e72a78c32819ebd7ed2bed551e3e.tar.bz2 rails-a2932784bb71e72a78c32819ebd7ed2bed551e3e.zip |
Merge docrails
Diffstat (limited to 'activesupport/lib/active_support/core_ext/base64/encoding.rb')
-rw-r--r-- | activesupport/lib/active_support/core_ext/base64/encoding.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/activesupport/lib/active_support/core_ext/base64/encoding.rb b/activesupport/lib/active_support/core_ext/base64/encoding.rb index 1a40da8785..a9656c138e 100644 --- a/activesupport/lib/active_support/core_ext/base64/encoding.rb +++ b/activesupport/lib/active_support/core_ext/base64/encoding.rb @@ -4,6 +4,9 @@ module ActiveSupport #:nodoc: module Encoding # Encodes the value as base64 without the newline breaks. This makes the base64 encoding readily usable as URL parameters # or memcache keys without further processing. + # + # ActiveSupport::Base64.encode64s("Original unencoded string") + # # => "T3JpZ2luYWwgdW5lbmNvZGVkIHN0cmluZw==" def encode64s(value) encode64(value).gsub(/\n/, '') end |