I already have a working solution, but I would really like to know why this doesn\'t work:
ratings = Model.select(:rating).uniq ratings.each { |r| puts r.rat
Model.uniq.pluck(:rating) # SELECT DISTINCT "models"."rating" FROM "models"
This has the advantages of not using sql strings and not instantiating models