module Base64

def self.decode64(data)

# => "Original unencoded string"
ActiveSupport::Base64.decode64("T3JpZ2luYWwgdW5lbmNvZGVkIHN0cmluZw==")

Decodes a base 64 encoded string to its original representation.
def self.decode64(data)
  data.unpack("m").first
end