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.
Zhao Y. (Guest)
on 2009-03-31 12: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?
Conrad T. (Guest)
on 2009-03-31 13:27
(Received via mailing list)
On Tue, Mar 31, 2009 at 1:57 AM, Zhao Yi
<removed_email_address@domain.invalid>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
derm_w (Guest)
on 2009-03-31 13: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.
Conrad T. (Guest)
on 2009-03-31 13:39
(Received via mailing list)
On Tue, Mar 31, 2009 at 2:32 AM, derm_w <removed_email_address@domain.invalid> 
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.