/assets route should not be prefixed #1081

Closed
lighthouse-import opened this Issue May 16, 2011 · 2 comments

Projects

None yet

3 participants

@lighthouse-import

Imported from Lighthouse. Original ticket at: http://rails.lighthouseapp.com/projects/8994/tickets/6768
Created by Oleg - 2011-05-03 15:46:09 UTC

Sprokets thing is attached as a last route. So if I have something like this in my routes:

Rails.application.routes.draw do
  get '/' => :render_page, :as => 'pages', :path => '(*page_path)'
end

My catch-all route will not allow /assets to map to a proper place. This is what I see in rake routes

pages GET    /(*page_path)(.:format)  {:controller=>"pages", :action=>"render_page"}
             /assets                  {:to=>#<Sprockets::Environment:0x00000100f5d240 ...

/assets route should be defined before any of my application routes.

@lighthouse-import

Imported from Lighthouse.
Comment by Mike Howard - 2011-05-07 20:36:24 UTC

This is Pilot error

rake route dies with 'missing controller' on this route file.

Need to specify controller for the generic route.

@tomafro

Actually I think was a bug, but one that has been fixed in commit 80bf68a

@josh josh closed this May 19, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment