I have a regular plain old static HTML file under my RAILS_ROOT that I would like to serve as itself (without any dynamic anything). How can I write a route to "pass the request through" succesfully. I tried map.connect ''path_to_file'', :controller => nil, :action => nil, :id => nil but that didn''t work. Also, note that I have this route already configured: map.connect '''', :controller => "eSimply" so I''m thinking that maybe that picks up everything? Thanks, Wes -- Posted via http://www.ruby-forum.com/.
Wes Gamble wrote:> I have a regular plain old static HTML file under my RAILS_ROOT that I > would like to serve as itself (without any dynamic anything).Just stick it in your public/ directory. The web server will spot that it exists, and not trigger the 404 action that drops into Rails, serving the static file instead. -- Alex
Wes Gamble
2006-Apr-26 17:28 UTC
[Rails] Re: Routing to a static HTML file under RAILS_ROOT
Thanks Alex. I should have checked my path more carefully - I simply asked for the wrong file. Sorry for the wasted time. WG Alex Young wrote:> Wes Gamble wrote: >> I have a regular plain old static HTML file under my RAILS_ROOT that I >> would like to serve as itself (without any dynamic anything). > Just stick it in your public/ directory. The web server will spot that > it exists, and not trigger the 404 action that drops into Rails, serving > the static file instead.-- Posted via http://www.ruby-forum.com/.