3
行,所以我有這個電話不區分大小寫group_by in Rails?
location.requests.group_by(&:song)
位置
>> location = Location.find 4
=> #<Location id: 4, venue: "Rod Laver Arena at Melbourne Park - Melbourne Vic, ...",
showdate: "2010-11-20", created_at: "2010-10-28 01:20:42", updated_at:
"2010-10-28 01:20:42", band_id: nil, artist_name: "Metallica">
location.requests.group_by(&:song)
此調用返回兩個記錄「一」和「一個」,因爲它們被保存在數據庫中這樣....如何重做GROUP_BY任何想法只返回一個記錄既
我使用SQLite