Skip to content

Instantly share code, notes, and snippets.

@brain-geek
Created February 10, 2012 19:01
Show Gist options
  • Save brain-geek/1791738 to your computer and use it in GitHub Desktop.
Save brain-geek/1791738 to your computer and use it in GitHub Desktop.
Mass replace assets hardcoded urls to rails helpers for sublime text
CSS:
Find What:
url\(../images/([^\)]+)\)
Replace with:
url(<%= asset_path '$1' %>)
And don't forget to switch to regexp search mode!
In html:
src="images/([^"]+)"
src="<%= asset_path '$1' %>"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment