i have a model house and a model owner
A house can have many owners.
Now i want to find all owners of a specific street and i want to list
So i do:
houses = House.find(:all, :conditions => ‘street LIKE “%foo%”’)
So now i got an array of all houses in that street
@owners = houses.owner i’ve got all the owners of the first house.
but i want from all houses so something like this:
@owners = houses[:all].owner
Does anyone know how to do this?
Thanks in advance