fix 'distinct: true' bug
-when distinct: true, was calling .uniq on an ActiveRecord Relation
-this was failing when Relation result of a sort by associated model attribute
-changed 'relation.uniq' to 'relation.all.uniq' to correct failure