[英]Case insensitive group_by in Rails?
ok so i have this call 好的,我有这个电话
location.requests.group_by(&:song)
location is 位置是
>> 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)
this call is returning two records "One" and "one" because they are saved that way in the db....any idea on how to redo the group_by to only return one record with both 这个调用返回两个记录“One”和“one”,因为它们以这种方式保存在db中....任何想法如何重做group_by只返回一个记录
I am using sqlite 我正在使用sqlite
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.