Skip to content

Commit

Permalink
Merge pull request #45647 from skipkayhil/rm-redundant-updating-option
Browse files Browse the repository at this point in the history
Remove duplicate 'updating' option from generator
  • Loading branch information
jonathanhefner committed Jul 24, 2022
2 parents 7548d76 + 7fe640b commit 76b0ef8
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
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ def generator_options
options[:skip_system_test] = Rails.application.config.generators.system_tests.nil?
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
Original file line number Diff line number Diff line change
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 76b0ef8

Please sign in to comment.