Class: Plum::ThemeAssetsController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- ApplicationController
- Plum::ThemeAssetsController
- Defined in:
- app/controllers/plum/theme_assets_controller.rb
Instance Method Summary collapse
Instance Method Details
#show ⇒ Object
5 6 7 8 9 10 11 12 13 14 |
# File 'app/controllers/plum/theme_assets_controller.rb', line 5 def show asset_path = ThemeResolver.new.find_asset(params[:theme_handle], params[:path]) return head :not_found unless asset_path expires_in 1.hour, public: true response.headers[Plum::StaticCache::MARKER_HEADER] = "store" send_file asset_path, type: Rack::Mime.mime_type(asset_path.extname, "application/octet-stream"), disposition: "inline" end |