From e6850f73ae9096e80576865d4eaf34c0c0249655 Mon Sep 17 00:00:00 2001 From: Stan Hu Date: Tue, 5 Feb 2019 04:47:40 -0800 Subject: Add Rails 6 deprecation error message --- lib/gitlab/content_disposition.rb | 7 +++++++ 1 file changed, 7 insertions(+) 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 -- cgit v1.2.1