I have an array of users who are managers.
However there are repeated Users.
I would like to group them so that there is only one instance of each User in the array.
What would be the best way to go about this?
@managers.sort_by{|obj| obj.id} # Just sorted the data but did not eliminate duplicats
@managers.group_by{|u|u.name} # just created a bunch of arrays for each name