How can I change the rails default page?


#1

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?


#2

On Tue, Mar 31, 2009 at 1:57 AM, Zhao Yi
removed_email_address@domain.invalidwrote:

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


#3

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.


#4

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