Better Assets is a monkeypatch to the Rails 2.3.2 AssetTagHelper to enable some additional functionality. The key points are:
- Time-based expiry of cached asset files, which is primarily useful for...
- Caching and combining of remote assets
- Finally, you can post-process combined assets with blocks passed to
It's easy. You use it just like normal:
This, oddly enough, works for CSS files, too.
<%=stylesheet_link_tag( "http://s3.amazonaws.com/getsatisfaction.com/feedback/feedback.css", "http://s3.amazonaws.com/getsatisfaction.com/feedback/widget.css", :cache => "remote", :lifetime => 12.hours ) %>
No more stalling out at requests to Amazon's S3 for CSS files! No more extraneous DNS requests or HTTP connections! No fuss, no muss, no headaches for you or you user.
All this, and it makes crispy bacon, too.*
To get it, just...wait for it. Very complex procedure ahead:
script/plugin install git://github.com/cheald/better_assets.git
Restart your app, and that's it. Your assets are now approximately 163% more awesome, while being leaner and looking better in that fabulous summer swimsuit at the same time.
* Not really.