未验证 提交 713f6243 编写于 作者: R Rafael França 提交者: GitHub

Merge pull request #35952 from utilum/instance_var

Squash `warning: instance variable @filename not initialized`
......@@ -25,7 +25,7 @@ def evaluate(action_view_erb_handler_context)
src = @src
view = Class.new(ActionView::Base) {
include action_view_erb_handler_context._routes.url_helpers
class_eval("define_method(:_template) { |local_assigns, output_buffer| #{src} }", @filename || "(erubi)", 0)
class_eval("define_method(:_template) { |local_assigns, output_buffer| #{src} }", defined?(@filename) ? @filename : "(erubi)", 0)
}.empty
view._run(:_template, nil, {}, ActionView::OutputBuffer.new)
end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册