Posts Tagged “ruby”

Database Associations- "Has One" vs "Belongs To"

Which One Goes Where? One of the most confusing database relationship questions for me was always when to use has_one vs belongs_to. The relationship is a simple one-to-one relationship, and if we think about it in terms of the models, it makes a lot of sense. For example, let's say...