instance method content_type

Ruby on Rails edge

Since edge

Returns the content type of the associated file:

“‘ ActiveStorage::Blob.first.content_type

> “image/png”

“‘

Source
# File activestorage/app/models/active_storage/blob.rb, line 190
  

Defined in activestorage/app/models/active_storage/blob.rb line 190 · View on GitHub · Improve this page · Find usages on GitHub

Defined in ActiveStorage::Blob

Type at least 2 characters to search.

Use the arrow keys to navigate results, Enter to open one, Escape to close.

Keyboard shortcuts

/
Focus search
⌘K / Ctrl-K
Command palette
?
This help
Esc
Close