How to bypass routing for a particular request?


#1

I would like to set up some my app. to display a standalone HTML page -
not rendered through RoR per se.

Something like

render(:inline => some_Javascript_function…

then in the Javascript

some_Javascript_function,

I want to open up a popup with the URL I specify. However, because it
is a relative URL, it is going through the RoR routing algorithm. I
don’t want that - can I set up a route that basically lets the request
pass through to the filesystem?

I’m sure there is a way to do this but it’s not obvious. I will look
into the url_for() documentation and see if I can find something.

Thanks,
Wes


#2

if the file that url matches to exist in your filesystem, then it will
not
reach routing process

for example if you have file rails_root/public/page.html you can link to
it
as http://www.site.com/page.html and it will be accessed directly
without
any rails intervention


#3

Emin,

Thanks, I forgot about the “public” option.

So…is this the only way to bypass routing - to put stuff into the
“public” directory?

It seems like it might be nice to have a programmatic way to indicate
that routing is not desired.

Thanks,
Wes

Emin H. wrote:

if the file that url matches to exist in your filesystem, then it will
not
reach routing process

for example if you have file rails_root/public/page.html you can link to
it
as http://www.site.com/page.html and it will be accessed directly
without
any rails intervention