I have an Artists model with name:string and other attributes. BUT I have multiple Artist entries under the SAME name.
Is there a way to pull an array of artist objects without any duplicates of name?
I've found ways to do with with only the name attribute but nothing where I can get the entire artist object.
These both do just the name attribute:
@artists = Artist.select('DISTINCT name').all
@artists = Artist.all.collect{ |a| a.name }.uniq