Re: Routes - Preventing a Match

djolley
Sat, 06 Jun 2009 15:52:16 -0000

> Any static files that exist in the public folder (eg all your images/
> js/css or public/static/test1.html) will be served as static files.

Well I''ll be darned!  :)  It works great.  How do these files escape
being mapped by routes.rb?  I notice that if I stick a file named
index.html in /static and then try to proceed to the /static URL in a
browser, Rails gives me a routing error.  However, as you say, the
file /static/test.html serves up just fine.  Now, if I could just
understand specifically why that is I think that I''d be finished with
this topic.

> Don''t forget that the url to browse to these files is /static/
> test1.html and not /public/static/test1.html since it is the public
> folder and not the rails root that is the webserver root directory.

Yep, I totally have that.  Thaks for pointing it out though as I do
often make stupid mistakes.

Thanks very much for the input.

         .... doug