Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert to the good old days when AssetTag didn't cause anyone problems
- Loading branch information
104898f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
arg :( why’s that?
104898f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Way to many caching issues, memory leaks, and other complications :(
We can always take another stab at it for 3.0.
104898f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i see.
too bad, the oop’ish style made it much simpler to extend and reuse things.
anyway. thanks for all your great work :)
104898f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pixeltrix
I think its more for images, so it would check “rails.png” if you were missing the extension.
104898f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But it doesn’t – if you pass ‘rails’ and ‘png’ the File.extname(source).blank? short circuits the File.exist?. Also adding ‘png’ by default was removed from image_path some time ago – so it only affects stylesheets and javascripts.
The only case where it might come in useful is if you have a stylesheet or javascript file with a double extension, e.g: prototype.1.6.0.js. Then you could do javascript_path(‘prototype.1.6.0’) and it would generate the correct path.
However it seems that doing multiple file stats so that you can save typing 3 or 4 characters seems wasteful. Perhaps an extra condition to short circuit the File.exist? if the File.extname == ext. This would eliminate the stats for filename.js.js and filename.css.css.
104898f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds like a good idea.
Please ticket me on LH and we can get that in.