Skip to content

Commit 300631e

Browse files
committed
Merge pull request rails#18840 from yuki24/remove-warning-from-plugin-generator
Remove warning from Plugin Generator
2 parents b6dd0c4 + 39af02a commit 300631e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

railties/lib/rails/generators/rails/plugin/plugin_generator.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -317,9 +317,9 @@ def modules
317317
@modules ||= namespaced_name.camelize.split("::")
318318
end
319319

320-
def wrap_in_modules(content)
321-
content = "#{content}".strip.gsub(/\W$\n/, '')
322-
modules.reverse.inject(content) do |content, mod|
320+
def wrap_in_modules(unwrapped_code)
321+
unwrapped_code = "#{unwrapped_code}".strip.gsub(/\W$\n/, '')
322+
modules.reverse.inject(unwrapped_code) do |content, mod|
323323
str = "module #{mod}\n"
324324
str += content.lines.map { |line| " #{line}" }.join
325325
str += content.present? ? "\nend" : "end"

0 commit comments

Comments
 (0)