It's pretty straight forward. Here's the relevant code from my working grid component that implements grouping:
JS:
initComponent: function(){
this.features = [{
ftype: 'grouping'
}];
this.callParent();
}
Ruby:
def configure(c)
super
c.data_store = {
# grouping
group_field: 'client__short_name',
# sorting
sorters: [
:client__short_name
]
}
end