diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2014-03-19 20:51:13 +0100 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2014-03-21 19:37:34 +0100 |
commit | 4bca34750d718a6f7a9bacbe181460b4505c4ba7 (patch) | |
tree | bc483fa68c6cdd6758c74bc82cd8ae866e4d1b07 | |
parent | 06b4f01fca1a31f174e24852e0bc2728e136e0b6 (diff) | |
download | rails-4bca34750d718a6f7a9bacbe181460b4505c4ba7.tar.gz rails-4bca34750d718a6f7a9bacbe181460b4505c4ba7.tar.bz2 rails-4bca34750d718a6f7a9bacbe181460b4505c4ba7.zip |
Log the full path, including variant, that the digestor is trying to find
-rw-r--r-- | actionview/lib/action_view/digestor.rb | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/actionview/lib/action_view/digestor.rb b/actionview/lib/action_view/digestor.rb index af7cfcfb6b..5dbd86df29 100644 --- a/actionview/lib/action_view/digestor.rb +++ b/actionview/lib/action_view/digestor.rb @@ -75,20 +75,21 @@ module ActionView end end - attr_reader :name, :format, :variant, :finder, :options + attr_reader :name, :format, :variant, :path, :finder, :options def initialize(options_or_deprecated_name, *deprecated_args) options = self.class._options_for_digest(options_or_deprecated_name, *deprecated_args) @options = options.except(:name, :format, :variant, :finder) @name, @format, @variant, @finder = options.values_at(:name, :format, :variant, :finder) + @path = "#{@name}.#{format}".tap { |path| path << "+#{@variant}" if @variant } end def digest Digest::MD5.hexdigest("#{source}-#{dependency_digest}").tap do |digest| - logger.try :info, "Cache digest for #{name}.#{format}: #{digest}" + logger.try :info, "Cache digest for #{path}: #{digest}" end rescue ActionView::MissingTemplate - logger.try :error, "Couldn't find template for digesting: #{name}.#{format}" + logger.try :error, "Couldn't find template for digesting: #{path}" '' end |