mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
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.
This commit is contained in:
parent
8ed0f542dd
commit
3624ff720c
1 changed files with 1 additions and 1 deletions
|
@ -17,7 +17,7 @@ module Erb # :nodoc:
|
|||
:erb
|
||||
end
|
||||
|
||||
def filename_with_extensions(name, format)
|
||||
def filename_with_extensions(name, format = self.format)
|
||||
[name, format, handler].compact.join(".")
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue