jahrichie
jahrichie

Reputation: 1235

Correct old paths over entire app

I just updated an outdated app to the pipeline, and 90% of my css paths are hosed. The old path was: /images/scrollers/upcoming_left.png the new path is /assets/scrollers/upcoming_left.png

Simply put, the first /images needs to become /assets across the entire app.

I was thinking of doing a find and replace across the entire stylesheets directory to take /images and change it to /assets .

The problem is, I only want to replace paths that start /images, not paths like http://foobar.com/images or /assets/images/foobar.png.

My regex skills are lacking but i'm pretty sure there's a dryer solution for this. I'm running rails 3.2, ruby 1.9.3, with sublime text 2...any help is more than appreciated!

Upvotes: 2

Views: 52

Answers (1)

Catfish
Catfish

Reputation: 19314

Couldn't you just do a fine and replace on ("/images? I'm guessing that all your css paths are something like url("/images/....")

Upvotes: 1

Related Questions