How to change index page in a Ruby on Rails Application

These are the steps:

  1. Open routes.rb (within config directory)
  2. Add in that file
    root :to => "posts#index"

We will see the new page defined for us when we open http://localhost:3000/. Validation:

  1. You are indicating the next direction within your directories and files:
    app >> views  >>  posts  >> index.html.erb
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s