提交 53d7b2ff 编写于 作者: C Carlos Antonio da Silva

Merge pull request #14129 from joankaradimov/fix-render-to-string

Fix `render_to_string` when called via manually instantiated controllers
......@@ -106,7 +106,9 @@ def _process_format(format, options = {})
def _normalize_render(*args, &block)
options = _normalize_args(*args, &block)
#TODO: remove defined? when we restore AP <=> AV dependency
options[:variant] = request.variant if defined?(request) && request.variant.present?
if defined?(request) && request && request.variant.present?
options[:variant] = request.variant
end
_normalize_options(options)
options
end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册