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:53:09 -0300 |
commit | f0268d56afa6be2eb4eb1fb953821d241f5adfc9 (patch) | |
tree | db6adb1cf231fd718474b5963efea83ca504bfd4 /actionpack/lib/action_view | |
parent | c82fd8fc2ac9f8273825fc272a0bf17e5c583d71 (diff) | |
download | rails-f0268d56afa6be2eb4eb1fb953821d241f5adfc9.tar.gz rails-f0268d56afa6be2eb4eb1fb953821d241f5adfc9.tar.bz2 rails-f0268d56afa6be2eb4eb1fb953821d241f5adfc9.zip |
Set proper rendered_format when doing render :inline
Closes #5632
Diffstat (limited to 'actionpack/lib/action_view')
-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 f7df9a6322..ae923de24e 100644 --- a/actionpack/lib/action_view/renderer/template_renderer.rb +++ b/actionpack/lib/action_view/renderer/template_renderer.rb @@ -9,8 +9,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]) |