Log in from a computer to take this course

You'll need to log in from a computer to start Learn Ruby on Rails. But you can practice or keep up your coding streak with the Codecademy Go app. Download the app to get started.

apple storegoogle store

Great! Looking at the request/response cycle, we need four parts to build the travel app: models, controllers, routes, and views.

Let’s begin by creating the models.



Generate a model named Tag.


Generate another model named Destination.


In app/models/tag.rb add a has_many method, like this:

class Tag < ActiveRecord::Base has_many :destinations end

In app/models/destination.rb, add a belongs_to method:

belongs_to :tag

Sign up to start coding

Mini Info Outline Icon
By signing up for Codecademy, you agree to Codecademy's Terms of Service & Privacy Policy.

Or sign up using:

Already have an account?