Change find(:all, group: SOME-COLUMN) to select(DISTINCT some-coloum) for POSTGRESQL compatibility