CSSEdit with Rails
June 19th, 2007
I love CSSEdit. It has to be one of the prettiest OS X programs out there, and it makes editing CSS a breeze.
The one thing that has annoyed me though has been using the override feature when developing with Rails. Rails likes to append an asset id on every CSS, JavaScript, and image file that it serves. If I have screen.css
, Rails would embed it like screen.css?123456789
. So every time I would reload the page in CSSEdit, the style sheet override would be broken, because the asset id would be different.
There is a fast and wonderfully simple solution. Just add this line in config/environments/development.rb
:
|
ENV["RAILS_ASSET_ID"] = "" |
Voila! No more asset id in development mode. No more broken overrides.
Credit: MacRabbit Blog
June 19th, 2007 at 05:02 PM
Nice! That is rather handy, thanks Ryan!
June 21st, 2007 at 02:29 PM
Thanks!!!
November 21st, 2007 at 06:56 PM
oh this rules, thanks for this. That’s been driving me crazy, but CSSEdit is so awesome I dealt with it.