Search⌘ K

Creating Some Example Active Records

Explore how to create Active Record models in Rails using database migrations, including defining string-based fields and setting up associations. Understand how to generate model classes and prepare the database schema for your Rails app.

We'll cover the following...

Creating models with database migrations

First, we’ll create the Manufacturer model. A manufacturer has a name as well as an address, which we’ll put directly on the ...