views:

1449

answers:

3

I know that to change the index page for rails I need to do three things: delete the index.html, do something with routes.rb, and probably make an action that the route will point to. It's the details that I am a little fuzzy on :-)

+6  A: 

Ok, I figured it out. Basically you

  1. Delete public.html
  2. Add 'map.root :controller => "foo"' to routes.rb
  3. and then of course create the controller foo with the action index.
Frew
+1  A: 

Don't forget to restart your server.

You can also run rake routes to show all the known routes and make sure everything looks sane.

+2  A: 

Follow Frew's steps and, as step 4, put a little html code in the index view file in the /views/foo folder to test it all.

Example:

<h1>My New Index Page</h1>
<p>Some text here.</p>
allesklar