<Toplevel Module>
ActiveSupport
—
#1
1 module ActiveSupport #:nodoc: 2 module CoreExtensions #:nodoc: 3 module Base64 #:nodoc: 4 module Encoding 5 # Encodes the value as base64 without the newline breaks. This makes the base64 encoding readily usable as URL parameters 6 # or memcache keys without further processing. 7 # 8 # ActiveSupport::Base64.encode64s("Original unencoded string") 9 # # => "T3JpZ2luYWwgdW5lbmNvZGVkIHN0cmluZw==" 10 def encode64s(value) 11 encode64(value).gsub(/\n/, '') 12 end 13 end 14 end 15 end 16 end