Skip to content

@atambo /gist:4636450
Created

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
namespace :assets do
desc "Make all embedded assets in stylesheets relative paths"
task :relativize => :environment do
Dir[Rails.root + "public/assets/*.css"].each do |asset|
contents = File.read(asset)
File.open(asset, "w") do |file|
file.puts contents.gsub("url(/assets/", "url(../")
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.