Browse files

Revert to the good old days when AssetTag didn't cause anyone problems

  • Loading branch information...
josh committed Jan 2, 2009
1 parent 606176a commit 104898fcb7958bcb69ba0239d6de8aa37f2da9ba
@@ -91,7 +91,6 @@ def reload_application
run_callbacks :prepare_dispatch
- ActionView::Helpers::AssetTagHelper::AssetTag::Cache.clear
# Cleanup the application by clearing out loaded classes so they can
Oops, something went wrong.

6 comments on commit 104898f


svenfuchs replied Feb 1, 2009

arg :( why’s that?


josh replied Feb 1, 2009

Way to many caching issues, memory leaks, and other complications :(

We can always take another stab at it for 3.0.


svenfuchs replied Feb 1, 2009

i see.

too bad, the oop’ish style made it much simpler to extend and reuse things.

anyway. thanks for all your great work :)


josh replied Feb 4, 2009


I think its more for images, so it would check “rails.png” if you were missing the extension.


pixeltrix replied Feb 4, 2009

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.


josh replied Feb 4, 2009

Sounds like a good idea.

Please ticket me on LH and we can get that in.

Please sign in to comment.