Module: ActiveStorage::Blob::Servable
- Included in:
- ActiveStorage::Blob, Preview, Variant, VariantWithRecord
- Defined in:
- app/models/active_storage/blob/servable.rb
Overview
:nodoc:
Instance Method Summary collapse
Instance Method Details
#content_type_for_serving ⇒ Object
4 5 6 |
# File 'app/models/active_storage/blob/servable.rb', line 4 def content_type_for_serving forcibly_serve_as_binary? ? ActiveStorage.binary_content_type : content_type end |
#forced_disposition_for_serving ⇒ Object
8 9 10 11 12 |
# File 'app/models/active_storage/blob/servable.rb', line 8 def forced_disposition_for_serving if forcibly_serve_as_binary? || !allowed_inline? :attachment end end |