Newb trying to figure out ActiveRecord relationships

3 tables. item, brand, commercial

item

id
name
brand_id
name

brand

id
name

commercial

id
item_id

The idea is that a commercial will have one item.
each item will have brand.
and a brand may have zero to many items.

I can’t figure out how to make the relationships for my models.
Eventually, i’d like to be able to show a brand name from a
commercial’s view.

Item

belongs_to :brand
has_one :commercial

Brand

has_many :items

Commercial

belongs_to :item

Michael

Thanks, Michael. That worked perfectly. For some reason I had all the
relationships exactly backwards.