I have an array of hashes where each hash contains a handful of keys. I want to check to see if any number of the hashes have the same user_id.
An example would look like this:
[ {:id => 1, :user_id => 2, :location => nil, :facility_id => nil}
{:id => 3, :user_id => 2, :location => 'China', :facility_id => 20} ]
I would need this to return true in this case, where two of the hashes have a user_id in common. How do I do this the 'ruby way'?