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

Explicity find with the rendered format to handle searching multiple view paths correctly

This commit is contained in:
Javan Makhmali 2016-06-15 16:25:58 -04:00
parent 2451177f37
commit 1717836e4f
3 changed files with 2 additions and 4 deletions

View file

@ -38,9 +38,7 @@ module ActionView
# Create a dependency tree for template named +name+.
def tree(name, finder, partial = false, seen = {})
logical_name = name.gsub(%r|/_|, "/")
format = finder.rendered_format
formats = finder.formats.without(format).unshift(format)
formats = [finder.rendered_format]
if finder.disable_cache { finder.exists?(logical_name, [], partial, [], formats: formats) }
template = finder.disable_cache { finder.find(logical_name, [], partial, [], formats: formats) }

View file

@ -17,7 +17,7 @@ class FixtureFinder < ActionView::LookupContext
FIXTURES_DIR = "#{File.dirname(__FILE__)}/../fixtures/digestor"
def initialize(details = {})
super(ActionView::PathSet.new(['digestor']), details, [])
super(ActionView::PathSet.new(['digestor', 'digestor/api']), details, [])
@rendered_format = :html
end
end