I have a customers model with a one to many relationship to an
addresses model, to allow customers to have multiple addresses.
I need to be able to search for customers using their different address
specifications. What is the best way to accomplish with? I currently am
going in a round about way, doing a find on the addresses model, and
then looing through all of the addresses and extracting each one of the
customers using address.customer, and placing them into an array.
Is there a one step solution to this problem, ie a find statement that
will produce all customers with (for example) a city of toronto?
Thanks for the help!