Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sprockets doesn't work alongside with catch-all routes #436

Closed
GBH opened this issue May 7, 2011 · 3 comments
Closed

Sprockets doesn't work alongside with catch-all routes #436

GBH opened this issue May 7, 2011 · 3 comments
Assignees
Milestone

Comments

@GBH
Copy link
Contributor

GBH commented May 7, 2011

This is a copy of: https://rails.lighthouseapp.com/projects/8994/tickets/6768-assets-route-should-not-be-prefixed

Long story short, the moment I introduce a catch-all route like this:

match '/*', :to => 'test#test'

Sprockets won't serve anything as /assets is taken over by my route. Before rake routes would actually show that sprockets relates routes come after my application routes. Now it won't show anything but I'm sure those routes are attached after. I think Sprockets routes have to be attached before any application/engines routes.

I'd fix it myself, but I have no idea where to look. Thanks.

@ghost ghost assigned josh and josevalim May 7, 2011
@josevalim
Copy link
Contributor

@josh, today we are using routes.append, so sprockets comes at the end, maybe we should swap to routes.prepend?

@josh
Copy link
Contributor

josh commented May 7, 2011

routes.prepend seems right. I think you hooked that code up for me JV :)

@josevalim
Copy link
Contributor

Hahaha, ok. I will fix it tomorrow then!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants