Rails 3.1 Asset Pipeline in the Real World(blog.nodeta.com)
blog.nodeta.com
Rails 3.1 Asset Pipeline in the Real World
http://blog.nodeta.com/2011/06/14/rails-3-1-asset-pipeline-in-the-real-world/
2 comments
You're unfortunately correct. This worked initially fine for us, as all resources were served through CDN. However, when images were changed and deployed the results weren't expected.
ERB helpers seem to be the only way currently.
ERB helpers seem to be the only way currently.
There should be a way to have a sass mixin that generates the md5 timestamp for the asset filename in the sass files, instead of having erb process the whole sass file.
Good read and really love that assets are first-class citizens in Rails. A little off topic, but can anyone point me in the direction of some resources on the biggest changes from 3.0.x to 3.1? Working on an upgrade now and have only played with 3.0.x and would like to know what to expect moving on up to 3.1. Thanks.
Rails 3.1 RC release blog point has good pointers on what has changed.
http://weblog.rubyonrails.org/2011/5/22/rails-3-1-release-ca...
http://weblog.rubyonrails.org/2011/5/22/rails-3-1-release-ca...
I believe the preferred method it is to generate your CSS with ERB, using the asset_path method. Though hopefully someone can correct me if I'm wrong.