diff options
author | Akira Matsuda <ronnie@dio.jp> | 2017-03-04 12:05:18 +0900 |
---|---|---|
committer | Akira Matsuda <ronnie@dio.jp> | 2017-03-04 12:05:18 +0900 |
commit | 49d61aed4cc52b8c649f74d23781b3d3f6e01f41 (patch) | |
tree | d71d6203046d3148b1533c56f3f3588eb609bb9e /railties/lib | |
parent | 64b797dee1c268da1b7e9a1e82b2599b54c0ed5a (diff) | |
download | rails-49d61aed4cc52b8c649f74d23781b3d3f6e01f41.tar.gz rails-49d61aed4cc52b8c649f74d23781b3d3f6e01f41.tar.bz2 rails-49d61aed4cc52b8c649f74d23781b3d3f6e01f41.zip |
A private method can't be called with `self.`
So calling `filename_with_extensions` omitting the second argument like this
https://github.com/slim-template/slim-rails/blob/8dbc1fbf859ebfa95b0884a0196a6ad9f0ca9cd5/lib/generators/slim/scaffold/scaffold_generator.rb#L10
causes NoMethodError.
fixes #28275
Diffstat (limited to 'railties/lib')
-rw-r--r-- | railties/lib/rails/generators/erb.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/railties/lib/rails/generators/erb.rb b/railties/lib/rails/generators/erb.rb index d5e326d6ee..97d9ab29d4 100644 --- a/railties/lib/rails/generators/erb.rb +++ b/railties/lib/rails/generators/erb.rb @@ -17,8 +17,8 @@ module Erb # :nodoc: :erb end - def filename_with_extensions(name, format = self.format) - [name, format, handler].compact.join(".") + def filename_with_extensions(name, file_format = format) + [name, file_format, handler].compact.join(".") end end end |