method

encode64

rails latest stable - Class: Base64

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (v3.2.13) is shown here.

encode64(data)
public

Encodes a string to its base 64 representation. Each 60 characters of output is separated by a newline character.

ActiveSupport::Base64.encode64("Original unencoded string")
# => "T3JpZ2luYWwgdW5lbmNvZGVkIHN0cmluZw==\n"