Rooms: id, name (has_many :rentals, belongs_to :units) People: id, name (has_many :rentals) Rentals: room_id, people_id, created_at, ended_at (belongs_to :rooms,
:people)
So Rentals is a join table between Rooms 6 people, correct?
try this:
Rooms: has_many :rentals has_many :people, :through => :rentals
People: has_many :rentals has_many: rooms, :through => :rentals
that should enable you to do @unit.rooms.people