Unique commenters on an article

I have an Article which has_many :comments, and Comment belongs_to :article and :user. I was wondering what the most efficient Arel query would be to get the unique users who commented on a given article.

Thanks!

1 Like

This StackOverflow post seems to answer this question well: http://stackoverflow.com/questions/5125209/how-to-fetch-distinct-values-with-arel-relational-algebra-and-has-many-through