Closed bsharpe closed 5 years ago
Had to revert. I'm not sure what the SELECT was ultimately pulling, but it resulted in linking to the incorrect ID of the artist.
Artist.followed_by(@user).with_name.order(name: :asc).uniq
That technically works but not sure how it is comparatively on performance.
apparently, there are multiple artists records with the same name (looks like 1 per music service). Which can currently be seen in the Artists tab of people you follow.
adding
SELECT DISTINCT ON ("artists"."name") *
to query to only show 1 per unique name.