ActiveStorage::Blob
STI subclasses inherit the table name (explicit override or convention) from their model superclass (one level; deeper STI needs an explicit set_table_name). Intermediate abstract bases (ApplicationRecord) are not models — walk past them. STI shape: a non-abstract registered model superclass marks the class as single-table-inherited (abstract intermediates like ApplicationRecord do not).
Constants
Constructors
Class methods
Instance methods
Rails: before_save :identify, if: :unidentified? — a blob saved
without a declared content type gets one from its magic bytes
(Marcel::MimeType.for(download, name:, declared_type:)).
The gem has no identified column either: presence of the
content_type column is the flag.
previewable? needs previewers (ffmpeg/poppler) — P2; a blob is representable in the port when it is variable.
URL the client PUTs the file to (presigned for cloud services, verifier-tokened for Disk).
Signed reference safe to expose client-side (direct-upload round trip: the browser submits this instead of the file).