I'm updating an existing rails 2 app to rails 3, and having some trouble understanding the asset pipeline. I have read through the guide and as I understand it, files in any of the following directories will resolve to /assets:
and you could access them using helpers...i.e.
image_tag('logo.png')
But what I don't understand is how collisions are handled? For example, what if there are the following files:
If I go to myapp.com/assets/images/logo.png, which file will be returned? I could check for collisions manually within my app, but this becomes a pain point when using gems that rely on the asset pipeline.
Based on what I've found, you can't have duplicate files, as rails will just return the first one found.
This seems like a bit of a design flaw, as a gem may not namespace their own assets
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With