Skip to content

Commit

Permalink
Unite Active Storage configs in load_defaults '6.1' into one if-sec…
Browse files Browse the repository at this point in the history
…tion

When I was comparing 'defaults' for 6.1 in this method and our configuring
guide, I was confused that some active_storage options are missing.

This change doesn't bring any implementation changes and feels like
a cosmetic change. Please feel free to close this if you think so and don't
see that we could benefit this change.
  • Loading branch information
bogdanvlviv committed Jan 8, 2021
1 parent b5b4bda commit 5e0d451
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions railties/lib/rails/application/configuration.rb
Expand Up @@ -163,10 +163,6 @@ def load_defaults(target_version)
active_record.legacy_connection_handling = false
end

if respond_to?(:active_storage)
active_storage.track_variants = true
end

if respond_to?(:active_job)
active_job.retry_jitter = 0.15
active_job.skip_after_callbacks_if_terminated = true
Expand All @@ -187,6 +183,8 @@ def load_defaults(target_version)
end

if respond_to?(:active_storage)
active_storage.track_variants = true

active_storage.queues.analysis = nil
active_storage.queues.purge = nil
end
Expand Down

0 comments on commit 5e0d451

Please sign in to comment.