From 1e23fff1a1844c43fc89b277ab4cc290573c1732 Mon Sep 17 00:00:00 2001 From: Petrik Date: Fri, 8 Sep 2023 09:57:30 +0200 Subject: [PATCH] Remove unused methods on ActiveStorage::Variant These methods were added in b221a4dc43368a1b6f00476f7c5f6047c5c7eea4 But they don't seem to be used by Rails internally or have any tests, so I assume they were added by accident? As they both seem to be marked as :nodoc: on ActiveStorage::Blob, we can remove them without a deprecation warning. If we decide to keep these methods, they should be added to ActiveStorage::VariantWithRecord as well. No one complaining about there methods missing on ActiveStorage::VariantWithRecord is another reason these methods aren't used. --- activestorage/app/models/active_storage/variant.rb | 6 ------ 1 file changed, 6 deletions(-) diff --git a/activestorage/app/models/active_storage/variant.rb b/activestorage/app/models/active_storage/variant.rb index f75c9beace..cb5816fe4c 100644 --- a/activestorage/app/models/active_storage/variant.rb +++ b/activestorage/app/models/active_storage/variant.rb @@ -91,12 +91,6 @@ def filename ActiveStorage::Filename.new "#{blob.filename.base}.#{variation.format.downcase}" end - alias_method :content_type_for_serving, :content_type - - def forced_disposition_for_serving # :nodoc: - nil - end - # Returns the receiving variant. Allows ActiveStorage::Variant and ActiveStorage::Preview instances to be used interchangeably. def image self