I defined has_one relationship in drivers table
has_one :current_haul
It is associated with hauls table.
And hauls table and drivers table, both of them has organization_id
.
I would like to apply the conditions like this
select *
from drivers
join hauls on drivers.organization_id=hauls.organization_id
and drivers.current_haul_id= hauls.id
I can I put this conditions in has_one
modifier ?