...

/

Active Record Is for Database Access

Active Record Is for Database Access

Learn how active record is used for database access in our Rails application.

We'll cover the following...

Overview

Although Rails is a Model-View-Controller (MVC) framework, the model layer in Rails is really a collection of record definitions. Models in Rails are classes that expose attributes that can be manipulated. Traditionally, those attributes come from the database and can be saved back, though we can use Active Model to create models that aren’t based on database tables.

No matter what else goes into a model class, it mostly certainly exposes attributes for manipulation, like a record ...