General Assembly Logo

Iterative Development of Rails APIs

Prerequisites

Objectives

By the end of this lesson, students should be able to:

  • Explain the value of iterative development.
  • Write request specs for associations.
  • Write model unit specs for associations.
  • Write model unit specs for validations.

Preparation

  1. Fork and clone this repository.
  2. Install dependencies with bundle install.

Iterative Development

Discussion: Choosing Endpoints for Article Comments

Demo: Shallow Routes

Demo: Authenticated Requests for Articles

Code-along: Associate Articles with Users

Lab: Associate Comments with Users

Lab: Associate Comments with Articles

Bonus: Write a Tested, Behavior-Driven Blog API in Rails

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