aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view/renderer/template_renderer.rb
diff options
context:
space:
mode:
authorSantiago Pastorino <santiago@wyeworks.com>2012-02-21 23:55:56 -0200
committerSantiago Pastorino <santiago@wyeworks.com>2012-02-22 11:13:02 -0200
commit19433ce8701d9ff2b311d0a2ec98be366ce461ea (patch)
treea2acdc41ab925c64d98b7944b3ff2d3928bb2412 /actionpack/lib/action_view/renderer/template_renderer.rb
parent35626feb61e260ec704ed407768da4c6a2f27a47 (diff)
downloadrails-19433ce8701d9ff2b311d0a2ec98be366ce461ea.tar.gz
rails-19433ce8701d9ff2b311d0a2ec98be366ce461ea.tar.bz2
rails-19433ce8701d9ff2b311d0a2ec98be366ce461ea.zip
format lookup for partials is derived from the format in which the template is being rendered
Closes #5025 part 2
Diffstat (limited to 'actionpack/lib/action_view/renderer/template_renderer.rb')
-rw-r--r--actionpack/lib/action_view/renderer/template_renderer.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/actionpack/lib/action_view/renderer/template_renderer.rb b/actionpack/lib/action_view/renderer/template_renderer.rb
index adf87a3f7e..ddde990b72 100644
--- a/actionpack/lib/action_view/renderer/template_renderer.rb
+++ b/actionpack/lib/action_view/renderer/template_renderer.rb
@@ -8,7 +8,8 @@ module ActionView
@details = extract_details(options)
extract_format(options[:file] || options[:template], @details)
template = determine_template(options)
- freeze_formats(template.formats, true)
+ @lookup_context.rendered_format ||= template.formats.first
+ @lookup_context.formats = template.formats
render_template(template, options[:layout], options[:locals])
end