Browse files

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.
  • Loading branch information...
afair authored and carlosantoniodasilva committed Feb 20, 2014
1 parent 8ed0f54 commit 3624ff720cf98293034d7d5fe87c08f5520099d6
Showing with 1 addition and 1 deletion.
  1. +1 −1 railties/lib/rails/generators/erb.rb
@@ -17,7 +17,7 @@ def handler
- def filename_with_extensions(name, format)
+ def filename_with_extensions(name, format = self.format)
[name, format, handler].compact.join(".")

0 comments on commit 3624ff7

Please sign in to comment.