General Assembly Logo

Rails: ActiveRecord Study

ActiveRecord is a Ruby library that serves as an object-relational-mapper (ORM). ORMs allow us to use a language different than SQL to perform CRUD on our data. ActiveRecord translates Ruby code into SQL and also creates Ruby objects from database rows.

ActiveRecord is a part of Rails and is used in the model layer. It allows us to use Ruby to manipulate objects without worrying about how those objects are persisted.

Prerequisites

Objectives

By the end of this, developers should be able to:

  • Explain the value of an ORM in developing an application.
  • Name model files and classes according to Rails conventions.
  • Reference basic CRUD operations in ActiveRecord using the Rails documentation.
  • Explain the role of migrations.
  • Reference documentation for writing migrations.
  • Explain the role of seed data.

Instructions

  1. Fork and clone this repository.
  2. Change into the new directory.
  3. Create and checkout a new branch, named response.
  4. Follow the directions given in study.md.
  5. When finished, push to your fork and submit a pull request.

You may wish to refer to FAQs related to forking, cloning, and pull requests.

Source code distributed under the MIT license. Text and other assets copyright General Assembly, Inc., all rights reserved.