aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--actionpack/CHANGELOG.md9
-rw-r--r--actionpack/lib/action_view/digestor.rb2
-rw-r--r--actionpack/test/template/digestor_test.rb2
3 files changed, 11 insertions, 2 deletions
diff --git a/actionpack/CHANGELOG.md b/actionpack/CHANGELOG.md
index e30029fb6d..84bb98e1b0 100644
--- a/actionpack/CHANGELOG.md
+++ b/actionpack/CHANGELOG.md
@@ -1,5 +1,14 @@
## Rails 4.0.0 (unreleased) ##
+* Fix cache digests to respect the format of view files being looked up.
+ `Digestor` called `LookupContext#find` with the options as the wrong argument
+ causing the formats option to be ignored.
+
+ Caching `article/show.pdf.erb` now correctly digests any dependencies as
+ `_partial.pdf.erb` and not `_partial.html.erb`.
+
+ *Martin Westin*
+
* Add support for passing custom url options other than `:host` and custom
status and flash options to `force_ssl`.
diff --git a/actionpack/lib/action_view/digestor.rb b/actionpack/lib/action_view/digestor.rb
index 9324a1ac50..6b9415e55d 100644
--- a/actionpack/lib/action_view/digestor.rb
+++ b/actionpack/lib/action_view/digestor.rb
@@ -57,7 +57,7 @@ module ActionView
end
def template
- @template ||= finder.find(logical_name, [], partial?, formats: [ format ])
+ @template ||= finder.find(logical_name, [], partial?, [], formats: [ format ])
end
def source
diff --git a/actionpack/test/template/digestor_test.rb b/actionpack/test/template/digestor_test.rb
index e29cecabc0..4c4264c0ba 100644
--- a/actionpack/test/template/digestor_test.rb
+++ b/actionpack/test/template/digestor_test.rb
@@ -15,7 +15,7 @@ end
class FixtureFinder
FIXTURES_DIR = "#{File.dirname(__FILE__)}/../fixtures/digestor"
- def find(logical_name, keys, partial, options)
+ def find(logical_name, prefixes, partial, keys, options)
FixtureTemplate.new("digestor/#{partial ? logical_name.gsub(%r|/([^/]+)$|, '/_\1') : logical_name}.#{options[:formats].first}.erb")
end
end