aboutsummaryrefslogtreecommitdiffstats
path: root/activestorage/lib/active_storage/downloading.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activestorage/lib/active_storage/downloading.rb')
-rw-r--r--activestorage/lib/active_storage/downloading.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/activestorage/lib/active_storage/downloading.rb b/activestorage/lib/active_storage/downloading.rb
index 7c3d20ade0..df820bc088 100644
--- a/activestorage/lib/active_storage/downloading.rb
+++ b/activestorage/lib/active_storage/downloading.rb
@@ -1,9 +1,17 @@
# frozen_string_literal: true
require "tmpdir"
+require "active_support/core_ext/string/filters"
module ActiveStorage
module Downloading
+ def self.included(klass)
+ ActiveSupport::Deprecation.warn <<~MESSAGE.squish, caller_locations(2)
+ ActiveStorage::Downloading is deprecated and will be removed in Active Storage 6.1.
+ Use ActiveStorage::Blob#open instead.
+ MESSAGE
+ end
+
private
# Opens a new tempfile in #tempdir and copies blob data into it. Yields the tempfile.
def download_blob_to_tempfile #:doc: