Hi, I have the following line which returns a collection: @associated_array = AssociatedAp.find(:all, :include => [:nic], :order => "date DESC", :conditions => [''nics.mac = ?'', @nic_mac] ) Here @nic_mac is a parameter being passed into the calling function. This call works perfectly, and returns all of AssociatedAp records that it should. However, what I would like to do is limit the returned set to include only the most recent occurrence of each unique associated_ap. The uniqueness should be determined by both the associated_ap.ssid and associated_ap.mac fields. Any help on how to accomplish this would be greatly appreciated. Thanks, Simon --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---