1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Merge pull request #10337 from eimermusic/fix_template_digestor_lookup

Fix ActionView::Digestor to correctly pass format to LookupContext

Conflicts:
	actionpack/CHANGELOG.md
This commit is contained in:
Rafael Mendonça França 2013-04-25 10:21:50 -03:00
commit b4239622af
3 changed files with 11 additions and 2 deletions

View file

@ -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`.

View file

@ -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

View file

@ -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