Forum: Ruby on Rails How to bypass routing for a particular request?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Bb4bdf2b184027bc38d4fb529770cde5?d=identicon&s=25 Wes Gamble (weyus)
on 2006-03-22 02:14
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
7cda78d70ab775710f6fa24e0a5b68db?d=identicon&s=25 Emin Hasanov (Guest)
on 2006-03-22 08:58
(Received via mailing list)
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
Bb4bdf2b184027bc38d4fb529770cde5?d=identicon&s=25 Wes Gamble (weyus)
on 2006-03-22 16:58
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 Hasanov 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
This topic is locked and can not be replied to.