this will only store one ID (for a has_one relationship). since you're setting the shift on a swap request, shifts do 'know' their swap requests automatically. the has_many :swap_requests line will provide this functionality