discourse/discourse — pull request #2566 by minasmart (2014-07-22 23:51:46+00:00)
Title: Enumerate deferred scripts with a sprockets helper

Solves the issue of hard coding deferred javascripts into the template as outlined in this [issue](https://meta.discourse.org/t/ruby-populate-hardcoded-assets-automatically/17896) and this [file](https://github.com/discourse/discourse/blob/master/app/views/common/_discourse_javascript.html.erb#L4) by enumerating the `defer` directory with a sprockets helper.

It uses the `asset_path` helper to look up the script's path, so it should work in all rails environments.