Skip to content

Commit

Permalink
Remove unused methods on ActiveStorage::Variant
Browse files Browse the repository at this point in the history
These methods were added in b221a4d
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.
  • Loading branch information
p8 committed Sep 8, 2023
1 parent 6633671 commit 1e23fff
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions activestorage/app/models/active_storage/variant.rb
Expand Up @@ -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
Expand Down

0 comments on commit 1e23fff

Please sign in to comment.