I have a Reports controller and various reports:
http://localhost/reports/main/this_month
http://localhost/reports/main/last_month
http://localhost/reports/main/this_year
I wanted http://localhost to default to http://localhost/reports/main/this_month. That is easy enough using map.root in my routes.rb.
However when I do this any links to http://localhost/reports/main/this_month are now shortened to just http://localhost. I want the links to stay full
I think it is very possible in Rails 2. The url string that is generated depends on which url helper you call in your view.
Now,
root_urlwill behttp://locahost/. When you usereports_url(:action => 'main', :timeframe => 'this_month'), it will behttp://localhost/reports/main/this_month. They both render the same action.It sounds like you have set up the root, but just don’t create any links with
root_url.