aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view/renderer/template_renderer.rb
diff options
context:
space:
mode:
authorKassio Borges <kassioborgesm@gmail.com>2013-08-23 22:46:49 -0300
committerKassio Borges <kassioborgesm@gmail.com>2013-08-24 15:24:36 -0300
commit424a5a7d46176eaa9617ad4fdc99d8c2be53b186 (patch)
treeb5fba23f5475f48692b6298863217669c0f0a624 /actionpack/lib/action_view/renderer/template_renderer.rb
parentadf6e30e3ad448c1edf2878255922a3faaa77c99 (diff)
downloadrails-424a5a7d46176eaa9617ad4fdc99d8c2be53b186.tar.gz
rails-424a5a7d46176eaa9617ad4fdc99d8c2be53b186.tar.bz2
rails-424a5a7d46176eaa9617ad4fdc99d8c2be53b186.zip
fix issue #11605
Diffstat (limited to 'actionpack/lib/action_view/renderer/template_renderer.rb')
-rw-r--r--actionpack/lib/action_view/renderer/template_renderer.rb5
1 files changed, 2 insertions, 3 deletions
diff --git a/actionpack/lib/action_view/renderer/template_renderer.rb b/actionpack/lib/action_view/renderer/template_renderer.rb
index d15e75637a..a27d5dd1b1 100644
--- a/actionpack/lib/action_view/renderer/template_renderer.rb
+++ b/actionpack/lib/action_view/renderer/template_renderer.rb
@@ -10,10 +10,9 @@ module ActionView
template = determine_template(options)
context = @lookup_context
- prepend_formats(template.formats)
-
unless context.rendered_format
- context.rendered_format = template.formats.first || formats.last
+ context.formats = template.formats unless template.formats.empty?
+ context.rendered_format = context.formats.first
end
render_template(template, options[:layout], options[:locals])