assets: don't add extension if other given and file exists #6423

Merged
merged 1 commit into from May 21, 2012

Conversation

Projects
None yet
3 participants
Contributor

lest commented May 21, 2012

closes #6310

backported rails/sprockets-rails#11 to 3-2-stable branch

@lest can you expand a little bit the commit message with a description of the problem, please? As per @drogus commit ae8b09c :)

Assets: don't add extension if other given and file exists
We should lookup if asset without appended extension exists.
When sprockets are disabled the asset tag helpers incorporate
this logic. When sprockets are enabled we should have the same
logic.

For example, we have style.ext file in app/assets/stylesheets and
we use stylesheet_link_tag in the layout. In this case we should
have /assets/style.ext instead of /assets/style.ext.css in the
output.

Closes #6310
Contributor

lest commented May 21, 2012

Great, thank you!

carlosantoniodasilva added a commit that referenced this pull request May 21, 2012

Merge pull request #6423 from lest/patch-2
assets: don't add extension if other given and file exists

@carlosantoniodasilva carlosantoniodasilva merged commit f051071 into rails:3-2-stable May 21, 2012

Contributor

Vanuan commented May 26, 2012

I think a little bit DRYer solution is possible.

@Vanuan thanks, please feel free to send a pull request :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment