Created

Embed URL

HTTPS clone URL

SSH clone URL

You can clone with HTTPS or SSH.

Download Gist
View gist:4636450
1 2 3 4 5 6 7 8 9 10 11
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.