Building has_one from has_many Associations

May 16, 2022

Track your progress

Sign in to track your progress and access subscription-only lessons.

Log In

Your Teacher

Collin Jilbert

Ruby on Rails Developer | Lover of Music | Skateboarder | Proud Papa | Co-editor @therubyradar | Launched @fleur_de_ruby

About This Episode

In this video, we will take a look at how to use a few association declaration options to build a couple of has_one associations off of a has_many association in Rails.

Notes

has_one_from_has_many repository
has_one Rails API documentation

Blog post walkthrough covering the topics mentioned here and adding uniqueness validations

Want to stay up-to-date with Ruby on Rails?

Join 86,946+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.