aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/railtie.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activesupport/lib/active_support/railtie.rb')
-rw-r--r--activesupport/lib/active_support/railtie.rb7
1 files changed, 4 insertions, 3 deletions
diff --git a/activesupport/lib/active_support/railtie.rb b/activesupport/lib/active_support/railtie.rb
index 6b8fa676a9..605b50d346 100644
--- a/activesupport/lib/active_support/railtie.rb
+++ b/activesupport/lib/active_support/railtie.rb
@@ -70,9 +70,10 @@ module ActiveSupport
end
initializer "active_support.set_hash_digest_class" do |app|
- if app.config.active_support.hash_digest_class
- ActiveSupport::Digest.hash_digest_class =
- app.config.active_support.hash_digest_class
+ config.after_initialize do
+ if app.config.active_support.use_sha1_digests
+ ActiveSupport::Digest.hash_digest_class = ::Digest::SHA1
+ end
end
end
end