method
format
v7.2.3 -
Show latest stable
- Class:
ActiveStorage::Blob::Representable
format()private
No documentation available.
# 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