documentcloud / jammit

Industrial Strength Asset Packaging for Rails
http://documentcloud.github.com/jammit/
MIT License
1.16k stars 197 forks source link

With include_javascripts, is there a way to get just the URL? #206

Open bhellman1 opened 12 years ago

bhellman1 commented 12 years ago

I need to use $.getScript, To use getScript I would need just the URL from Jammit. Is this possible?

$.getScript('ajax/test.js', function(data, textStatus){ console.log('Load was performed.'); });

Thanks

danielstocks commented 12 years ago

Here's what i did:

     <%= javascript_path (Jammit.asset_url("desktop", :js)) %>

Assumes you have :desktop JavaScript packages in config/assets.yml

cheers