This project is archived and is in readonly mode.
Add magic encoding comment to generated files
-
Craig Webster
- Title changed from Customising asset paths to [PATCH] Customising asset paths
Fixed a typo in the comments.
-
Stephan Wehner
Could you not override the rewrite_asset_path method? There is a comment at line 713 of http://github.com/rails/rails/blob/master/actionpack/lib/action_vie...
# Break out the asset path rewrite in case plugins wish to put the asset id # someplace other than the query string.Stephan
-
Craig Webster
I could override it but rewrite_asset_path is private and not directly tested so it might go away in the future - possibly without notice. I feel that relying on this largely undocumented method existing in all version of Rails is a bad thing and that providing a tested, documented, public way of customising these paths is a better solution.
-
Stephan Wehner
I see. That makes sense.
To me the comment describes what you're trying to accomplish, so maybe move it and the rewrite_asset_path method into the public section + add tests? Otherwise, I think the comment might as well be dropped.
Stephan
-
Craig Webster
Exposing and testing rewrite_asset_path would be acceptable too, although the approach I've taken in the current patch does provide the same sort of API as setting asset_host and I prefer that.
I'll have a look into doing what you suggest tonight and see where I get. Thanks for your feedback!
-
Repository
- State changed from new to resolved
(from [201e8986b15f4d815355e0ca96e02cf16dba9372]) Updated asset_template_path to asset_path and have it also support a String [#4247 Add magic encoding comment to generated files state:resolved] http://github.com/rails/rails/commit/201e8986b15f4d815355e0ca96e02c...
-
Jeff Kreeftmeijer
Automatic cleanup of spam.
-
Jeff Kreeftmeijer
Automatic cleanup of spam.
