Method: AssetType.for

Defined in:
app/models/asset_type.rb

.for(attachment) ⇒ Object

class methods



179
180
181
182
# File 'app/models/asset_type.rb', line 179

def self.for(attachment)
  extension = attachment.record.original_extension
  from_extension(extension) || from_mimetype(attachment.content_type) || catchall
end