Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2019-02-05 15:47:40 +0300
committerStan Hu <stanhu@gmail.com>2019-02-05 15:47:40 +0300
commite6850f73ae9096e80576865d4eaf34c0c0249655 (patch)
treeab8494e19ae159b5d758a91c180527de5b07443f /lib/gitlab/content_disposition.rb
parent41b51c065604091579a2308adc527fe5bb187abe (diff)
Add Rails 6 deprecation error message
Diffstat (limited to 'lib/gitlab/content_disposition.rb')
-rw-r--r--lib/gitlab/content_disposition.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/gitlab/content_disposition.rb b/lib/gitlab/content_disposition.rb
index 96ead8a9fbf..32207514ce5 100644
--- a/lib/gitlab/content_disposition.rb
+++ b/lib/gitlab/content_disposition.rb
@@ -3,6 +3,13 @@
# which will be available in Rails 6.
module Gitlab
class ContentDisposition # :nodoc:
+ # Make sure we remove this patch starting with Rails 6.0.
+ if Rails.version.start_with?('6.0')
+ raise <<~MSG
+ Please remove this file and use `ActionDispatch::Http::ContentDisposition` instead.
+ MSG
+ end
+
def self.format(disposition:, filename:)
new(disposition: disposition, filename: filename).to_s
end