How do I change a rails app so that a controller foo appears as the application root?
In other words, right now all the urls look like host.com/foo/... and I'd like to get rid of the foo and have simply host.com/...
How do I change a rails app so that a controller foo appears as the application root?
In other words, right now all the urls look like host.com/foo/... and I'd like to get rid of the foo and have simply host.com/...
In your routes.rb you add a named route like so:
map.home '', :controller => 'foo', :action => 'index'
This will build a route for when the root of web application is requested, it will use the foo controller and call the index action. Make sure you have it at the bottom so it is given the lowest priority.