Forum: Ruby on Rails How can I change the rails default page?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
7fbd0e99b27064b14793f028022974e5?d=identicon&s=25 Zhao Yi (youhaodeyi)
on 2009-03-31 10:57
I start rails server and the default(http://localhost:3000) page would
be Ruby on Rails welcome page. Can I change this page or redirect to a
controller?
40db9e75b3f5899258e3bdc0c9210154?d=identicon&s=25 Conrad Taylor (conradwt)
on 2009-03-31 11:27
(Received via mailing list)
On Tue, Mar 31, 2009 at 1:57 AM, Zhao Yi
<rails-mailing-list@andreas-s.net>wrote:

>
> I start rails server and the default(http://localhost:3000) page would
> be Ruby on Rails welcome page. Can I change this page or redirect to a
> controller?


Hi, you can add the following in your routes.rb file at the top within
the
block:

map.root :controller => "some_controller_name", :action =>
 "some_action_name"

Also, you can find additional examples with the routes.rb file.  I wish
that
this
info helps.

Good luck,

-Conrad
4f371d1c780e2e176febf7976c964fa4?d=identicon&s=25 derm_w (Guest)
on 2009-03-31 11:33
(Received via mailing list)
I'm new to rails myself but I think you'll find the welcome page in
the index.html file in the public folder in your app.

Kind regards,

Dermot.
40db9e75b3f5899258e3bdc0c9210154?d=identicon&s=25 Conrad Taylor (conradwt)
on 2009-03-31 11:39
(Received via mailing list)
On Tue, Mar 31, 2009 at 2:32 AM, derm_w <dermotward@eircom.net> wrote:

> > be Ruby on Rails welcome page. Can I change this page or redirect to a
> > controller?
> > --
>

In most Rails projects, one will delete the index.html file that's
located
in
rails_app/public directory.  Now, you can create the index page as an
action of a controller or you can simply create another index.html with
what you want and place it in the public directory.

Good luck,

-Conrad
This topic is locked and can not be replied to.