Skip to content

Commit

Permalink
Remove duplicate 'updating' option from generator
Browse files Browse the repository at this point in the history
:update has been defined since a7adec9, and both options serve the same
purpose
  • Loading branch information
skipkayhil committed Jul 23, 2022
1 parent 97f13c2 commit 7fe640b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
1 change: 0 additions & 1 deletion railties/lib/rails/app_updater.rb
Expand Up @@ -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
options
end
end
Expand Down
10 changes: 5 additions & 5 deletions railties/lib/rails/generators/rails/app/app_generator.rb
Expand Up @@ -100,16 +100,16 @@ def config
empty_directory "config"

inside "config" do
template "routes.rb" unless options[:updating]
template "routes.rb" unless options[:update]
template "application.rb"
template "environment.rb"
template "cable.yml" unless options[:updating] || options[:skip_action_cable]
template "puma.rb" unless options[:updating]
template "storage.yml" unless options[:updating] || skip_active_storage?
template "cable.yml" unless options[:update] || options[:skip_action_cable]
template "puma.rb" unless options[:update]
template "storage.yml" unless options[:update] || skip_active_storage?

directory "environments"
directory "initializers"
directory "locales" unless options[:updating]
directory "locales" unless options[:update]
end
end

Expand Down

0 comments on commit 7fe640b

Please sign in to comment.