diff options
author | Akira Matsuda <ronnie@dio.jp> | 2019-08-01 18:43:25 +0900 |
---|---|---|
committer | Akira Matsuda <ronnie@dio.jp> | 2019-08-01 18:51:51 +0900 |
commit | 530f7805ed5790af1d472a041bc74089dc183f47 (patch) | |
tree | 9c897d7b77cd00127f8a51685506db1e5a4d00c2 /activestorage/app/jobs/active_storage | |
parent | 03018cb79be301fb40a57c9ac92a392b1eb8ee61 (diff) | |
download | rails-530f7805ed5790af1d472a041bc74089dc183f47.tar.gz rails-530f7805ed5790af1d472a041bc74089dc183f47.tar.bz2 rails-530f7805ed5790af1d472a041bc74089dc183f47.zip |
It may be better to explicitly require 'object/try' where we call `try`
In most cases it works now without explicit require because it's accidentally required through
active_support/core_ext/date_and_time/calculations.rb where we still call `try`,
but that would stop working if we changed the Calculations implementation and remove the require call there.
Diffstat (limited to 'activestorage/app/jobs/active_storage')
-rw-r--r-- | activestorage/app/jobs/active_storage/mirror_job.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/activestorage/app/jobs/active_storage/mirror_job.rb b/activestorage/app/jobs/active_storage/mirror_job.rb index e34faedb56..e70629d6ec 100644 --- a/activestorage/app/jobs/active_storage/mirror_job.rb +++ b/activestorage/app/jobs/active_storage/mirror_job.rb @@ -1,5 +1,7 @@ # frozen_string_literal: true +require "active_support/core_ext/object/try" + # Provides asynchronous mirroring of directly-uploaded blobs. class ActiveStorage::MirrorJob < ActiveStorage::BaseJob queue_as { ActiveStorage.queues[:mirror] } |