lib/symmetric_encryption/railtie.rb in symmetric-encryption-0.5.1 vs lib/symmetric_encryption/railtie.rb in symmetric-encryption-0.5.2
- old
+ new
@@ -26,10 +26,10 @@
# symmetric_key: 1234567890ABCDEF1234567890ABCDEF
# symmetric_iv: 1234567890ABCDEF
#
# Loaded before Active Record initializes since database.yml can have encrypted
# passwords in it
- initializer "symmetric-encryption.initialize" , :before=>"active_record.initialize_database" do
+ config.before_configuration do
config_file = Rails.root.join("config", "symmetric-encryption.yml")
if config_file.file?
::SymmetricEncryption.load!(config_file, Rails.env)
else
puts "\nSymmetric Encryption config not found. Create a config file at: config/symmetric-encryption.yml"