This project is archived and is in readonly mode.

#1879 ✓resolved
Andrew White

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

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

Pages