instance method media_type

Ruby on Rails edge

Since v8.0.5.2 Private — implementation detail, not part of the public API

Available in: v8.0.5.2 v8.1.4.1 edge

Signature

media_type()

Marcel answers in canonical lowercase, so drop parameters and case before comparing.

Source
# File activestorage/app/models/active_storage/blob.rb, line 426
    def media_type
      content_type.to_s.split(";").first.to_s.strip.downcase
    end

Defined in activestorage/app/models/active_storage/blob.rb line 426 · 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