Skip to content
  • Evgeniy Rashchepkin's avatar
    6af56621
    Disable template digesting for Active Storage controllers · 6af56621
    Evgeniy Rashchepkin authored
    Error entries appear in the log when we request ActiveStorage
    controllers (`ActiveStorage::Representations::ProxyController#show`,
    `ActiveStorage::Blobs::ProxyController#show`).
    
    These entries look like: "Couldn't find template for digesting:
    active_storage/representations/proxy/show".
    
    These controllers use the method
    `ActionController::ConditionalGet#http_cache_forever`,
    and therefore `ActionController::ConditionalGet#combine_etags` method,
    and therefore `ActionController::EtagWithTemplateDigest` module via
    `etaggers` array.
    
    `ActionController::EtagWithTemplateDigest` module requires a template
    (view).
    
    We have no views in ActiveStorage, so `EtagWithTemplateDigest` is
    now turned off in ActiveStorage controllers by
    `etag_with_template_digest` class attribute.
    6af56621
    Disable template digesting for Active Storage controllers
    Evgeniy Rashchepkin authored
    Error entries appear in the log when we request ActiveStorage
    controllers (`ActiveStorage::Representations::ProxyController#show`,
    `ActiveStorage::Blobs::ProxyController#show`).
    
    These entries look like: "Couldn't find template for digesting:
    active_storage/representations/proxy/show".
    
    These controllers use the method
    `ActionController::ConditionalGet#http_cache_forever`,
    and therefore `ActionController::ConditionalGet#combine_etags` method,
    and therefore `ActionController::EtagWithTemplateDigest` module via
    `etaggers` array.
    
    `ActionController::EtagWithTemplateDigest` module requires a template
    (view).
    
    We have no views in ActiveStorage, so `EtagWithTemplateDigest` is
    now turned off in ActiveStorage controllers by
    `etag_with_template_digest` class attribute.
Loading