From 5747e53c92c3fbb52814c3313c489f2a208f685f Mon Sep 17 00:00:00 2001 From: Santiago Pastorino Date: Wed, 28 Mar 2012 18:52:56 -0300 Subject: Set proper rendered_format when doing render :inline Closes #5632 --- actionpack/lib/action_view/renderer/template_renderer.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'actionpack/lib/action_view') diff --git a/actionpack/lib/action_view/renderer/template_renderer.rb b/actionpack/lib/action_view/renderer/template_renderer.rb index 36c1e6a9e4..a27d5dd1b1 100644 --- a/actionpack/lib/action_view/renderer/template_renderer.rb +++ b/actionpack/lib/action_view/renderer/template_renderer.rb @@ -11,8 +11,8 @@ module ActionView context = @lookup_context unless context.rendered_format - context.rendered_format = template.formats.first - context.formats = template.formats + context.formats = template.formats unless template.formats.empty? + context.rendered_format = context.formats.first end render_template(template, options[:layout], options[:locals]) -- cgit v1.2.3