diff options
author | Santiago Pastorino <santiago@wyeworks.com> | 2012-03-28 18:52:56 -0300 |
---|---|---|
committer | Santiago Pastorino <santiago@wyeworks.com> | 2012-03-28 18:55:14 -0300 |
commit | 87825a6ab596e84a13bbebeb4846227cbbc5b209 (patch) | |
tree | 49bf12f475459f5d3e9442f51f8f263005ff9106 /actionpack/lib | |
parent | db2c1354eb37bc2f5747a2b3faaa7964ed0df986 (diff) | |
download | rails-87825a6ab596e84a13bbebeb4846227cbbc5b209.tar.gz rails-87825a6ab596e84a13bbebeb4846227cbbc5b209.tar.bz2 rails-87825a6ab596e84a13bbebeb4846227cbbc5b209.zip |
Set proper rendered_format when doing render :inline
Closes #5632
Diffstat (limited to 'actionpack/lib')
-rw-r--r-- | actionpack/lib/action_view/renderer/template_renderer.rb | 4 |
1 files changed, 2 insertions, 2 deletions
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]) |