diff options
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 |