instance method
previewable?
Ruby on Rails 8.1.2
Since v5.2.8.1Signature
previewable?()
Returns true if any registered previewer accepts the blob. By default, this will return true for videos and PDF documents.
Source
# File activestorage/app/models/active_storage/blob/representable.rb, line 138
def previewable?
ActiveStorage.previewers.any? { |klass| klass.accept?(self) }
end
Defined in activestorage/app/models/active_storage/blob/representable.rb line 138
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveStorage::Blob::Representable