Class JavascriptCompressionController
In: app/controllers/javascript_compression_controller.rb
Parent: ApplicationController

Methods

download  

Public Instance methods

[Source]

   # File app/controllers/javascript_compression_controller.rb, line 3
3:   def download
4:     response.headers['Content-Encoding'] = 'gzip';
5:     send_file File.join(ActionView::Helpers::AssetTagHelper::JAVASCRIPTS_DIR, params[:js_file] + '.js.gz'),
6:       :filename => params[:js_file] + '.js',
7:       :type => 'text/javascript',
8:       :disposition => 'inline'
9:   end

[Validate]