grouping activities by user; using jbuilder to format json response