diff options
Diffstat (limited to 'activesupport/lib/active_support/railtie.rb')
-rw-r--r-- | activesupport/lib/active_support/railtie.rb | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/activesupport/lib/active_support/railtie.rb b/activesupport/lib/active_support/railtie.rb index 3488721df9..6b8fa676a9 100644 --- a/activesupport/lib/active_support/railtie.rb +++ b/activesupport/lib/active_support/railtie.rb @@ -10,9 +10,11 @@ module ActiveSupport config.eager_load_namespaces << ActiveSupport initializer "active_support.set_authenticated_message_encryption" do |app| - if app.config.active_support.respond_to?(:use_authenticated_message_encryption) - ActiveSupport::MessageEncryptor.use_authenticated_message_encryption = - app.config.active_support.use_authenticated_message_encryption + config.after_initialize do + unless app.config.active_support.use_authenticated_message_encryption.nil? + ActiveSupport::MessageEncryptor.use_authenticated_message_encryption = + app.config.active_support.use_authenticated_message_encryption + end end end @@ -68,9 +70,9 @@ module ActiveSupport end initializer "active_support.set_hash_digest_class" do |app| - if app.config.active_support.respond_to?(:use_hash_digest_class) && app.config.active_support.use_hash_digest_class + if app.config.active_support.hash_digest_class ActiveSupport::Digest.hash_digest_class = - app.config.active_support.use_hash_digest_class + app.config.active_support.hash_digest_class end end end |