rails/rails — pull request #7923 by josh (2012-10-12 18:55:54+00:00)
Title: Split asset url helpers into seperate AssetUrlHelper

`AssetTagHelper` mixes up helpers that generate html content tags and pure url generation.

The url helpers, `image_path`, `javascript_path`, etc are useful outside the view. You should be able to generate a javascript url from a controller, just as you can call any route helper method.

Sprockets would like to just be able to mix in the url generators into its rendering context w/o any of the tag helper stuff.

I have a few more pull requests to follow this.

I really think we need to revert and remove all the `AssetPaths` tag stuff that was added 3. Its difficult to safely have any plugin hook in or be able to call any of the private helpers in the class.

Compare this mess
https://github.com/rails/sprockets-rails/blob/master/lib/sprockets/rails/helpers/rails_helper.rb#L118-174

to just having one `compute_asset_path` method that plugins can override
https://github.com/josh/sprockets-rails/blob/master/lib/sprockets/rails/helper.rb#L42-50

/cc @dhh @guilleiguaran