I'm running a Rails 3.2 app on Heroku, and thus am required to use the asset pipeline.
One thing that has seriously confused me for a while now about the Rails asset pipeline is the result of this little experiment:
git rm -r public/assets
git commit -m "Nuke all generated assets"
RAILS_ENV=production bundle exec rake assets:precompile
git add .
RAILS_ENV=production bundle exec rake assets:precompile
Specifically, if I examine the difference between my staged and unstaged changes, I find that the second asset precompilation has regenerated/refingerprinted/reminified all my CSS and JS.
Why should that occur when I changed nothing between asset compilations?
Obviously the current timestamp is somehow involved, but why is that so when - again - I changed nothing?
Finally, is there any way to change asset precompilation such that CSS and JS assets are only regenerated if they were changed since the last precompilation?