uniq is a Unix/POSIX/Linux utility to remove or filter duplicate lines from a sorted file.
I have following query: Article.joins(:themes => [:users]).where(["articles.user_id != ?", current_user.id]).order("Random()").limit(15).uniq …
database ruby-on-rails-3 postgresql activerecord uniq