Index: asset_package_helper.rb

===================================================================

--- asset_package_helper.rb (revision 4068)

+++ asset_package_helper.rb (revision 4069)

@@ -44,16 +44,8 @@

private
# rewrite compute_public_path to allow us to not include the query string timestamp
# used by ActionView::Helpers::AssetTagHelper
- def compute_public_path(source, dir, ext, add_asset_id=true)
- source = source.dup
- source << ".#{ext}" if File.extname(source).blank?
- unless source =~ %r{^[-a-z]+://}
- source = "/#{dir}/#{source}" unless source[0] == ?/
- asset_id = rails_asset_id(source)
- source << '?' + asset_id if defined?(RAILS_ROOT) and add_asset_id and not asset_id.blank?
- source = "#{ActionController::Base.asset_host}#{@controller.request.relative_url_root}#{source}"
- end
- source
+ def compute_public_path_without_timestamp(source, dir, ext)
+ compute_public_path(source, dir, ext).gsub(/\?\d+$/i, '')
end

# rewrite javascript path function to not include query string timestamp
@@ -58,7 +50,7 @@


# rewrite javascript path function to not include query string timestamp
def javascript_path(source)
- compute_public_path(source, 'javascripts', 'js', false)
+ compute_public_path_without_timestamp(source, 'javascripts', 'js')
end

# rewrite stylesheet path function to not include query string timestamp
@@ -63,7 +55,7 @@


# rewrite stylesheet path function to not include query string timestamp
def stylesheet_path(source)
- compute_public_path(source, 'stylesheets', 'css', false)
+ compute_public_path_without_timestamp(source, 'stylesheets', 'css')
end

end