This project is archived and is in readonly mode.
Eliminate unnecessary File.exist? in compute_public_path when correct file extension given
Reported by Andrew White | February 5th, 2009 @ 12:50 AM
Currently compute_public_path in asset_tag_helper.rb performs an unnecessary File.exist? check when a source with the correct file extension has been passed in.
e.g. stylesheet_path('theme.css') results in a File.exist? check for theme.css.css
The attached patch eliminates this File.exist? call whenever the extension of the specified source matches the specified extension. There are no additional tests as there is already test coverage for source paths using non-standard extensions and source paths without extensions.
Comments and changes to this ticket
-
DHH February 5th, 2009 @ 07:16 PM
- Milestone cleared.
-
Repository February 5th, 2009 @ 09:46 PM
- State changed from new to resolved
(from [7aa847fab4da41bfa30fa356fc0d7d79b7081734]) Eliminate unnecessary File.exist? when correct file extension given [#1879 state:resolved]
Signed-off-by: Joshua Peek josh@joshpeek.com http://github.com/rails/rails/co...
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
<h2 style="font-size: 14px">Tickets have moved to Github</h2>
The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>
People watching this ticket
Attachments
Referenced by
- 1879 Eliminate unnecessary File.exist? in compute_public_path when correct file extension given (from [7aa847fab4da41bfa30fa356fc0d7d79b7081734]) Elimina...