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 -- Posted via http://www.ruby-forum.com/.
Emin Hasanov
2006-Mar-22 07:58 UTC
[Rails] How to bypass routing for a particular request?
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 On 3/22/06, Wes Gamble <weyus@att.net> wrote:> > 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 > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060322/fe340a6f/attachment.html
Wes Gamble
2006-Mar-22 15:58 UTC
[Rails] Re: How to bypass routing for a particular request?
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-- Posted via http://www.ruby-forum.com/.