Class: RoundhouseUi::AssetsController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- RoundhouseUi::AssetsController
- Defined in:
- app/controllers/roundhouse_ui/assets_controller.rb
Overview
Serves the vendored Turbo build same-origin so it passes the engine's CSP (script-src 'self') without a build step or asset pipeline.
Constant Summary collapse
- TURBO_PATH =
RoundhouseUi::Engine.root.join("app/assets/javascripts/roundhouse_ui/turbo.min.js").freeze
Constants inherited from ApplicationController
RoundhouseUi::ApplicationController::AUDIT_VERBS
Instance Method Summary collapse
Methods inherited from ApplicationController
Instance Method Details
#turbo ⇒ Object
11 12 13 14 |
# File 'app/controllers/roundhouse_ui/assets_controller.rb', line 11 def turbo response.headers["Cache-Control"] = "public, max-age=31536000, immutable" send_file TURBO_PATH, type: "text/javascript", disposition: "inline" end |