def package
      parse_request
      template_ext = Jammit.template_extension.to_sym
      case @extension
      when :js
        render :js => (@contents = Jammit.packager.pack_javascripts(@package))
      when template_ext
        render :js => (@contents = Jammit.packager.pack_templates(@package))
      when :css
        render :text => generate_stylesheets, :content_type => 'text/css'
      end
      cache_package if perform_caching && (@extension != template_ext)
    rescue Jammit::PackageNotFound
      package_not_found
    end
def package
      parse_request
      template_ext = Jammit.template_extension.to_sym
      case @extension
      when :js
        render :js => (@contents = Jammit.packager.pack_javascripts(@package))
      when template_ext
        render :js => (@contents = Jammit.packager.pack_templates(@package))
      when :css
        render :text => generate_stylesheets, :content_type => 'text/css'
      end
      cache_package if perform_caching && (@extension != template_ext)
    rescue Jammit::PackageNotFound
      package_not_found
    end
The "package" action receives all requests for asset packages that haven't
 yet been cached. The package will be built, cached, and gzipped.