You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 8, 2018. It is now read-only.
I use a sprite plugin that appends the timestamp to the url in css:
url(/images/logo.png?194819891)
So if you just add url = url.split("?")[0], to the following method, it works great!
defreplace_css_images!(options={})options[:prefix] ||= ''# adapted from https://github.com/blakink/asset_iddata.gsub!/url\((?:"([^"]*)"|'([^']*)'|([^)]*))\)/mido |match|
begin# $1 is the double quoted string, $2 is single quoted, $3 is no quotesuri=($1 || $2 || $3).to_s.stripuri.gsub!(/^\.\.\//,'/')# if the uri appears to begin with a protocol then the asset isn't on the local filesystemifuri =~ /[a-z]+:\/\//i"url(#{uri})"elseurl=url.split("?")[0]asset=Asset.new(uri)# TODO: Check the referenced asset is in the asset_pathsputs" - Changing CSS URI #{uri} to #{options[:prefix]}#{asset.fingerprint}"if@@debug"url(#{options[:prefix]}#{asset.fingerprint})"endrescueErrno::ENOENT=>eputs" - Warning: #{uri} not found"if@@debug"url(#{uri})"endendend