lib/lockbox/railtie.rb in lockbox-0.6.0 vs lib/lockbox/railtie.rb in lockbox-0.6.1
- old
+ new
@@ -1,7 +1,11 @@
module Lockbox
class Railtie < Rails::Railtie
initializer "lockbox" do |app|
+ if defined?(Rails.application.credentials)
+ Lockbox.master_key ||= Rails.application.credentials.dig(:lockbox, :master_key)
+ end
+
require "lockbox/carrier_wave_extensions" if defined?(CarrierWave)
if defined?(ActiveStorage)
require "lockbox/active_storage_extensions"