[Rails] best way to select uncommon elements from array

2010-02-16 Thread rahtha
I have two arrays and i want to get all items which are NOT common to both, so basically if i have two arrays A and B, i want all elements in A that are not in B. what is the best way to do this apart from using two nested loops. thanks rahtha -- You received this message because you are

Re: [Rails] best way to select uncommon elements from array

2010-02-16 Thread Xavier Noria
On Tue, Feb 16, 2010 at 8:10 AM, rahtha rahul.that...@gmail.com wrote: I have two arrays and i want to get all items which are NOT common to both, so basically if i have two arrays A and B, i want all elements in A that are not in B. what is the best way to do this apart from using two nested