Another newb online… trying belongs_to and has_one constructs for
the first time.
table Location defined as:
nickname, street, city, … , contact_id
the model includes “belongs_to :contact”
table Contact defined as:
name, title, … , location_id
the model includes “has_one :location”
When I build a list_contacts view, I assume
h(contact.location.nickname) will make the connection. However Rails
returns nil for contact.location. (Verified the linkage is present,
thanks to script/console.) Seems like I’m missing something very
simple, but I’m stumped. Ideas?