Class: InnerPerformance::FrontendsController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- InnerPerformance::FrontendsController
- Defined in:
- app/controllers/inner_performance/frontends_controller.rb
Constant Summary collapse
- STATIC_ASSETS =
{ css: { bootstrap: asset_path("vendor/bootstrap.min.css"), }, }.freeze
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
Instance Method Details
#static ⇒ Object
24 25 26 27 28 29 30 |
# File 'app/controllers/inner_performance/frontends_controller.rb', line 24 def static file_stem = params[:stem]&.to_sym file_format = params[:format]&.to_sym file_path = STATIC_ASSETS.dig(file_format, file_stem) || raise(ActionController::RoutingError, "Not Found") send_file(file_path, disposition: "inline") end |