Hello All, I am currently looking for the easiest way to search across multiple models. Suppose I am implementing an online inventory look-up system. A user will search for a product and a list of stores within 10 miles that have that product in stock will be returned. I have two models: Store and Product. Store contains all the location information. Product contains all the product information. Store has_many Products. I would imagine that I could carry this query out in two steps: 1) Retrieve a list of all stores within 10 miles. 2) Search for products within those stores. This two-step process seems a little klunky. Is there any better way to do this efficiently in Rails? I am using GeoKit to calculate distances. Thanks in advance, -Tom --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---