Skip to content
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...
1 parent d7cf95c commit 4ca8180f5660651919bc67dd03fa1f634750b27d @afair afair committed with carlosantoniodasilva Feb 20, 2014
Showing with 1 addition and 1 deletion.
  1. +1 −1 railties/lib/rails/generators/erb.rb
View
2 railties/lib/rails/generators/erb.rb
@@ -17,7 +17,7 @@ def handler
:erb
end
- def filename_with_extensions(name, format)
+ def filename_with_extensions(name, format = self.format)
[name, format, handler].compact.join(".")
end
end

0 comments on commit 4ca8180

Please sign in to comment.
Something went wrong with that request. Please try again.