Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove warning from Plugin Generator #18840

Merged
merged 1 commit into from Feb 9, 2015

Conversation

yuki24
Copy link
Contributor

@yuki24 yuki24 commented Feb 7, 2015

This removes the following warning:

rails/railties/lib/rails/generators/rails/plugin/plugin_generator.rb:321: warning: shadowing outer local variable - content

@vipulnsward
Copy link
Member

LGTM

@@ -319,10 +319,10 @@ def modules

def wrap_in_modules(content)
content = "#{content}".strip.gsub(/\W$\n/, '')
modules.reverse.inject(content) do |content, mod|
modules.reverse.inject(content) do |kontent, mod|
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it is better to rename the outside variable to unwrapped_code

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll second that. kontent sounds like a typo (even though it mimics the klass convention).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unwrapped_code sounds better! i'll change it.

This removes the following warning:

  rails/railties/lib/rails/generators/rails/plugin/plugin_generator.rb:321: warning: shadowing outer local variable - content
@yuki24 yuki24 force-pushed the remove-warning-from-plugin-generator branch from 09d3f51 to 39af02a Compare February 8, 2015 23:45
@yuki24
Copy link
Contributor Author

yuki24 commented Feb 8, 2015

updated commit. Thanks @vipulnsward @rafaelfranca for reviewing!

senny added a commit that referenced this pull request Feb 9, 2015
…rator

Remove warning from Plugin Generator
@senny senny merged commit 300631e into rails:master Feb 9, 2015
@senny
Copy link
Member

senny commented Feb 9, 2015

@yuki24 thank you.

@yuki24 yuki24 deleted the remove-warning-from-plugin-generator branch February 9, 2015 10:37
@rafaelfranca
Copy link
Member

❤️ 💚 💙 💛 💜

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants