Class: DispatchPolicy::AssetsController

Inherits:
ApplicationController show all
Defined in:
app/controllers/dispatch_policy/assets_controller.rb

Overview

Serves vendored static assets at content-addressed URLs so browsers can cache them forever. The digest is part of the URL, not a query string, so caches keyed on path alone still bust on upgrade.

Instance Method Summary collapse

Instance Method Details

#logoObject



14
15
16
# File 'app/controllers/dispatch_policy/assets_controller.rb', line 14

def 
  serve(Assets::LOGO_SMALL_BODY, Assets::LOGO_SMALL_DIGEST, "image/svg+xml")
end

#turboObject



10
11
12
# File 'app/controllers/dispatch_policy/assets_controller.rb', line 10

def turbo
  serve(Assets::TURBO_BODY, Assets::TURBO_DIGEST, "application/javascript")
end