/activerecord-resource-library

A collection of specs that teach you how to use active record relations and scopes.

Primary LanguageRuby

Active Record Resource Library

  1. Learning Objectives
  2. Instructions

Learning Objectives

  1. Models and migrations for one to many relationships
  2. Validations
  3. Scopes to retrieve specific collections from the database

Instructions

You will make the following spec files pass, in order:

  1. spec/level_1_spec.rb
  2. spec/level_2_spec.rb
  3. spec/level_3_spec.rb

Chagne 1 xit to it at a time and commit each time you make the test pass.

Submit a pull request to this repository before leaving for lunch so your peers can review your code.

DO NOT MERGE SOLUTION PULL REQUESTS INTO THIS REPOSITORY

Helpful Resources

  1. Shoulda Matchers
  2. Creating a table
  3. The ActiveRecord Migration docs
  4. The Has Many Association
  5. The Has Many Through Association
  6. The Belongs To Association
  7. Scopes