From b9e7c676ca13e286a371dc1b4996d2c15c0461e8 Mon Sep 17 00:00:00 2001 From: Eugene Kenny Date: Sun, 17 Dec 2017 00:49:02 +0000 Subject: Don't include ellipsis in truncated digest output Using `truncate` to limit the length of the digest has the unwanted side effect of adding an ellipsis when the input is longer than the limit. Also: - Don't instantiate a new object for every digest - Rename the configuration option to `hash_digest_class` - Update the CHANGELOG entry to describe how to use the feature --- activesupport/lib/active_support/railtie.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'activesupport/lib/active_support/railtie.rb') diff --git a/activesupport/lib/active_support/railtie.rb b/activesupport/lib/active_support/railtie.rb index 3488721df9..91872e29c8 100644 --- a/activesupport/lib/active_support/railtie.rb +++ b/activesupport/lib/active_support/railtie.rb @@ -68,9 +68,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.respond_to?(:hash_digest_class) && 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 -- cgit v1.2.3