From 94f9b16ec41b548b82441293dfee511a3fa40dac Mon Sep 17 00:00:00 2001 From: Martin Westin Date: Wed, 24 Apr 2013 11:45:52 +0300 Subject: [PATCH 1/2] Fix format passing to ActionView::LookupContext Add missing argument in call to ActionView::LookupContext which caused formats of templates to be incorrect. --- lib/cache_digests/template_digestor.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/cache_digests/template_digestor.rb b/lib/cache_digests/template_digestor.rb index 0039a60..fba4f08 100644 --- a/lib/cache_digests/template_digestor.rb +++ b/lib/cache_digests/template_digestor.rb @@ -60,7 +60,7 @@ def source end def template - @template ||= finder.find(logical_name, [], partial?, formats: [ format ]) + @template ||= finder.find(logical_name, [], partial?, [], formats: [ format ]) end def dependency_digest From f9e75eda0795107f44fdad8999d298fea68f2472 Mon Sep 17 00:00:00 2001 From: Martin Westin Date: Wed, 24 Apr 2013 21:07:25 +0200 Subject: [PATCH 2/2] FixtureFinder::find signature matches LookupContext Matching the method signature makes all tests pass with the fix in the previous commit. --- test/template_digestor_test.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/template_digestor_test.rb b/test/template_digestor_test.rb index 067c9cb..9356cc6 100644 --- a/test/template_digestor_test.rb +++ b/test/template_digestor_test.rb @@ -21,7 +21,7 @@ class FixtureFinder FIXTURES_DIR = "#{File.dirname(__FILE__)}/fixtures" TMP_DIR = "#{File.dirname(__FILE__)}/tmp" - def find(logical_name, keys, partial, options) + def find(logical_name, prefixes, partial, keys, options) FixtureTemplate.new("#{TMP_DIR}/#{partial ? logical_name.gsub(%r|/([^/]+)$|, '/_\1') : logical_name}.#{options[:formats].first}.erb") end end