Forum: Ruby on Rails adding the root index page?

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
7b2880cb9d7d75511c9b4448c016f62d?d=identicon&s=25 Marc na (marconrails)
on 2007-02-10 13:42
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?
40db9e75b3f5899258e3bdc0c9210154?d=identicon&s=25 Conrad Taylor (Guest)
on 2007-02-10 14:11
(Received via mailing list)
Hi, you can easily edit the index.html located in your RoR app's public

Good luck,

70225136eacd3d870f64e03bff678655?d=identicon&s=25 Russell Norris (Guest)
on 2007-02-10 15:08
(Received via mailing list)
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
the right controller and method. No need to rely on a static page.

Ce01db9bec66e5796cad9fe202acf8e1?d=identicon&s=25 Chris Martin (Guest)
on 2007-02-10 16:29
(Received via mailing list)
Russell Norris wrote:
Yes, just edit config/routes.rb and it's written right there in the

Chris Martin
Web Developer
This topic is locked and can not be replied to.