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 duplicate 'updating' option from generator #45647

Merged
merged 1 commit into from Jul 24, 2022

Conversation

skipkayhil
Copy link
Member

Summary

:update has been defined since a7adec9, and both options serve the same
purpose

:update has been defined since a7adec9, and both options serve the same
purpose
@rails-bot rails-bot bot added the railties label Jul 23, 2022
@@ -31,7 +31,6 @@ def generator_options
options[:skip_test] = !defined?(Rails::TestUnitRailtie)
options[:skip_asset_pipeline] = !defined?(Sprockets::Railtie) && !defined?(Propshaft::Railtie)
options[:skip_bootsnap] = !defined?(Bootsnap)
options[:updating] = true
Copy link
Member

Choose a reason for hiding this comment

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

I kind of like options[:updating] better than options[:update]. Is there a reason to prefer one over the other? It looks there are (a small few) more occurrences of options[:updating]:

$ git grep 'options\[:updating\]' | wc -l
6

$ git grep 'options\[:update\]' | wc -l
2

Copy link
Member Author

Choose a reason for hiding this comment

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

I initially picked :update because its older, but I also think it aligns with the naming of other options (since these are technically rails new CLI options). :pretend, :force, :quiet etc. make me think :update is a better fit vs :pretending, :forcing, :quietly where I think :updating would make more sense.

Copy link
Member

Choose a reason for hiding this comment

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

Ok, that makes sense! 👍

@jonathanhefner jonathanhefner merged commit 76b0ef8 into rails:main Jul 24, 2022
@jonathanhefner
Copy link
Member

Thank you, @skipkayhil! ✔️ ✔️ ✔️

@skipkayhil skipkayhil deleted the rm-redundant-updating-option branch July 24, 2022 17:17
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

2 participants