instance method
credentials
Ruby on Rails 7.1.6
Since v5.2.8.1Signature
credentials()
Returns an ActiveSupport::EncryptedConfiguration instance for the credentials file specified by config.credentials.content_path.
By default, config.credentials.content_path will point to either config/credentials/#{environment}.yml.enc for the current environment (for example, config/credentials/production.yml.enc for the production environment), or config/credentials.yml.enc if that file does not exist.
The encryption key is taken from either ENV["RAILS_MASTER_KEY"], or from the file specified by config.credentials.key_path. By default, config.credentials.key_path will point to either config/credentials/#{environment}.key for the current environment, or config/master.key if that file does not exist.
Source
# File railties/lib/rails/application.rb, line 519
def credentials
@credentials ||= encrypted(config.credentials.content_path, key_path: config.credentials.key_path)
end
Defined in railties/lib/rails/application.rb line 519
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in Rails::Application