diff options
author | Stan Hu <stanhu@gmail.com> | 2019-02-05 04:47:40 -0800 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2019-02-05 04:47:40 -0800 |
commit | e6850f73ae9096e80576865d4eaf34c0c0249655 (patch) | |
tree | ab8494e19ae159b5d758a91c180527de5b07443f | |
parent | 41b51c065604091579a2308adc527fe5bb187abe (diff) | |
download | gitlab-ce-e6850f73ae9096e80576865d4eaf34c0c0249655.tar.gz |
Add Rails 6 deprecation error message
-rw-r--r-- | lib/gitlab/content_disposition.rb | 7 |
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 |