Grouping by Name but disregarding capitalization...

Posted by bgadoci on Stack Overflow See other posts from Stack Overflow or by bgadoci
Published on 2010-12-23T05:37:07Z Indexed on 2010/12/23 5:54 UTC
Read the original article Hit count: 226

Filed under:
|

I have built a Ruby on Rails app that allows users to track workouts. I also allow them to add groups (like blog tags) to workouts to help keep organized. In most places where I display the tags I do so by grouping by name.

@group_counts = current_user.groups.count(:group => :name, 
       :order => 'count_all DESC')

Is there a way to disregard capitalization. For instance I have two different records returned for Push press and Push Press.

© Stack Overflow or respective owner

Related posts about ruby-on-rails

Related posts about ruby