Class: AssetBundler::AssetsController
- Inherits:
-
ActionController::Metal
- Object
- ActionController::Metal
- AssetBundler::AssetsController
- Includes:
- ActionController::MimeResponds, ActionController::Rendering, ActionController::Streaming
- Defined in:
- app/controllers/asset_bundler/assets_controller.rb
Direct Known Subclasses
Assets::ImagesController, Assets::JavascriptsController, Assets::StylesheetsController
Instance Method Summary collapse
Instance Method Details
#go ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'app/controllers/asset_bundler/assets_controller.rb', line 12 def go # Always cache resources. It's the responsibility of the asset tag to # invalidate the browser cache with a cache-busting query string. headers['Cache-Control'] = 'public' headers['Expires'] = 1.year.from_now.httpdate begin template = find_template(File.join(self.controller_name, self.expansion_for(params[:path]))) send_file template.identifier, :type => formats.first, :disposition => 'inline' rescue raise(ActionController::RoutingError, "No route matches #{ request.path.inspect }") end end |