Class: Rails::Application

Inherits:
Engine
  • Object
show all
Defined in:
lib/rails/application_encrypted.rb

Instance Method Summary collapse

Instance Method Details

#encrypted(path, key_path: "config/master.key", env_key: "RAILS_MASTER_KEY") ⇒ Object



4
5
6
7
8
9
10
11
12
# File 'lib/rails/application_encrypted.rb', line 4

def encrypted(path, key_path: "config/master.key", env_key: "RAILS_MASTER_KEY")
  ActiveSupport::EncryptedConfiguration.new(
    config_path: Rails.root.join(path),
    key_path: Rails.root.join(key_path),
    env_key: env_key,
    raise_if_missing_key: config.require_master_key,
    rails_env: Rails.env
  )
end