提交 3624ff72 编写于 作者: A Allen Fair 提交者: Carlos Antonio da Silva

Fix for external generators extend Erb::Generators

HAML and probably other generators extend this class and invoke
filename_with_extensions with the old signature (without format).
This makes the second argument optional and defaults it to the #format
method which could be overridden as well.

Closes #14132.
上级 8ed0f542
...@@ -17,7 +17,7 @@ def handler ...@@ -17,7 +17,7 @@ def handler
:erb :erb
end end
def filename_with_extensions(name, format) def filename_with_extensions(name, format = self.format)
[name, format, handler].compact.join(".") [name, format, handler].compact.join(".")
end end
end end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册