hi all (newbie here) what is the best way to create a dynamic root to your ROR application, i.e. to the address: http://localhost:3000. By default this is created in the public folder as a html page. I was wondering whether I should delete this page and create a new one in the app, and if this is the case how do i configure the controller and view to display this page?
on 2007-02-10 13:42
on 2007-02-10 14:11
Hi, you can easily edit the index.html located in your RoR app's public folder. Good luck, -Conrad
on 2007-02-10 15:08
Just add an index action on whatever controller you're using to serve up whatever. [Specific, huh?] Add a route like so... map.index "/", :controller => [your controller], :action => "index" It's that simple. If it doesn't fit in neatly with any of your other controllers, you might want to just plop that index method into ApplicationController. Just make sure the routing directs the base path to the right controller and method. No need to rely on a static page. RSL