Saving Data

Create a model

The rails generate model command created a new model named Message.

rails generate model Message

In doing so, Rails created two files:

a model file in app/models/message.rb. The model represents a table in the database.

a migration file in db/migrate/. Migrations are a ......

First Ruby On Rails App

Create a Rails APP (Rails version 4.1.1)rails new MySite

bundle install

rails server

View the Rails app in the browser by visiting http://localhost:8000.

request/response cycle

What happens when you visit http://localhost:8000 in the browser?

The browser makes a request for the URL http:......