Rails 7 API Application

Episode #396 by Teacher's Avatar David Kimura

Summary

In this episode, we look at setting up a Rails 7 API (only) application and create our own authentication solution. We'll also write the tests around the different controller endpoints that we create to make sure that we have good test coverage and functionality.
rails api test 24:57

Chapters

  • Introduction (0:00)
  • Creating the API application (1:11)
  • Setting up authentication (2:02)
  • Creating the user model (4:07)
  • Current Attributes (4:57)
  • Creating the routes (5:38)
  • Creating the user registrations controller (6:54)
  • Quick talk about JSON builders (9:11)
  • Writing tests for the registrrations controller (9:49)
  • Creating the user authentications controller (12:37)
  • Writing tests for the authentications controller (15:28)
  • Creating a welcome controller (19:06)
  • Finishing up writing the authorization tests (20:59)
  • Code coverage (22:24)
Student & Teacher
$ 9 /mo

Valid School Email Required

Same Access as Pro

Subscribe Now
Pro Monthly
$ 19 /mo

Access to Pro Episodes

Invite to Slack Channel

Priority Suggestions

Ad Free

Subscribe Now
Pro Annual
$ 190 /yr

Access to Pro Episodes

Invite to Slack Channel

Priority Suggestions

Ad Free

Subscribe Now
Teams
$ 57 /mo

3 Users Minimum

$19.00 / user / month

Same Access as Pro

Subscribe to Teams