Table.select("DISTINCT name").map(&:name) : DISTINCT name去重查询name
Table.active.map{|x| x.name}.uniq :查询出来后做去重操组
Table.select("DISTINCT name").map(&:name) : DISTINCT name去重查询name
Table.active.map{|x| x.name}.uniq :查询出来后做去重操组
转载于:https://www.cnblogs.com/lv-books/p/9171779.html