method

specification

rails latest stable - Class: ActiveStorage::Variant

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (v6.0.0) is shown here.

specification()
private

No documentation available.

# File activestorage/app/models/active_storage/variant.rb, line 113
    def specification
      @specification ||=
        if WEB_IMAGE_CONTENT_TYPES.include?(blob.content_type)
          Specification.new              filename: blob.filename,
            content_type: blob.content_type,
            format: nil
        else
          Specification.new              filename: ActiveStorage::Filename.new("#{blob.filename.base}.png"),
            content_type: "image/png",
            format: "png"
        end
    end