method
format
rails latest stable - Class:
ActiveStorage::Blob::Representable
format()private
No documentation available.
# File activestorage/app/models/active_storage/blob/representable.rb, line 118
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