instance method
format
Ruby on Rails 7.2.3
Since v6.1.7.10 PrivateSignature
format()
No documentation comment.
Source
# File activestorage/app/models/active_storage/blob/representable.rb, line 192
def format
if filename.extension.present? && Marcel::MimeType.for(extension: filename.extension) == content_type
filename.extension
else
Marcel::Magic.new(content_type.to_s).extensions.first
end
end
Defined in activestorage/app/models/active_storage/blob/representable.rb line 192
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveStorage::Blob::Representable