diff options
author | Aaron Patterson <tenderlove@github.com> | 2019-03-01 14:06:41 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-01 14:06:41 -0800 |
commit | ed6364f7b6579a890c5cedc3c9e5b2f8af586e9e (patch) | |
tree | d30267bf589b995579904244316829156d14b5f6 /actionview/lib/action_view/rendering.rb | |
parent | 2939c2c0e011347d06ba3cc9dfe4ebe3b08f6799 (diff) | |
parent | bcd42ae974eb04cb5def7a01d194e70b87bc4152 (diff) | |
download | rails-ed6364f7b6579a890c5cedc3c9e5b2f8af586e9e.tar.gz rails-ed6364f7b6579a890c5cedc3c9e5b2f8af586e9e.tar.bz2 rails-ed6364f7b6579a890c5cedc3c9e5b2f8af586e9e.zip |
Merge pull request #35429 from jhawthorn/template_format_nil
Allow nil format on templates
Diffstat (limited to 'actionview/lib/action_view/rendering.rb')
-rw-r--r-- | actionview/lib/action_view/rendering.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/actionview/lib/action_view/rendering.rb b/actionview/lib/action_view/rendering.rb index e5e2771323..ac861c44d4 100644 --- a/actionview/lib/action_view/rendering.rb +++ b/actionview/lib/action_view/rendering.rb @@ -118,7 +118,8 @@ module ActionView renderer.render_to_object(context, options) end - @rendered_format = Template::Types[rendered_template.format] + rendered_format = rendered_template.format || lookup_context.formats.first + @rendered_format = Template::Types[rendered_format] rendered_template.body end |