diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2013-04-25 10:21:50 -0300 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2013-04-25 10:22:51 -0300 |
commit | b4239622afc4f3f73808fd0c97512f3a534e07dd (patch) | |
tree | a658495ba3fcea62356eb6b29ad53cafad84bc37 | |
parent | f99ce3c188f5dde57e2ff63e6a22363c62f0a4cd (diff) | |
parent | 9a79c13c45b34c8bf338d341a421badeb4815c94 (diff) | |
download | rails-b4239622afc4f3f73808fd0c97512f3a534e07dd.tar.gz rails-b4239622afc4f3f73808fd0c97512f3a534e07dd.tar.bz2 rails-b4239622afc4f3f73808fd0c97512f3a534e07dd.zip |
Merge pull request #10337 from eimermusic/fix_template_digestor_lookup
Fix ActionView::Digestor to correctly pass format to LookupContext
Conflicts:
actionpack/CHANGELOG.md
-rw-r--r-- | actionpack/CHANGELOG.md | 9 | ||||
-rw-r--r-- | actionpack/lib/action_view/digestor.rb | 2 | ||||
-rw-r--r-- | actionpack/test/template/digestor_test.rb | 2 |
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 |