Merchant has_many Shops
Shop belongs_to Merchant
i.e. One merchant
(Starbucks) can have many shops locations.
I'm using Gecoder to get the nearby shops, e.g. @shops = Shop.near("Times Square")
.
I would like to return only 1 record for each merchant only. I.e. @shops
only contain 1 Starbucks, 1 Subway, but is a collection.
Sorry I've been Googling and searching on SO to no avail. Perhaps I'm not using the right word to describe what I want. Thanks in advance.