edge badge
Methods
A
Instance Public methods
add_credentials_file()
# File railties/lib/rails/generators/rails/credentials/credentials_generator.rb, line 9
def add_credentials_file
  unless credentials.content_path.exist?
    template = credentials_template

    say "Adding #{credentials.content_path} to store encrypted credentials."
    say ""
    say "The following content has been encrypted with the Rails master key:"
    say ""
    say template, :on_green
    say ""

    add_credentials_file_silently(template)

    say "You can edit encrypted credentials with `bin/rails credentials:edit`."
    say ""
  end
end
add_credentials_file_silently(template = nil)
# File railties/lib/rails/generators/rails/credentials/credentials_generator.rb, line 27
def add_credentials_file_silently(template = nil)
  unless credentials.content_path.exist?
    credentials.write(credentials_template)
  end
end