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:
commit
b4239622af
3 changed files with 11 additions and 2 deletions
|
@ -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`.
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue