The power of group+aggs User.calculate_in_group(:count, :age, [...10, 10...50, 50..])
https://github.com/igorkasyanchuk/calculate_in_group with this gem you can group and do aggregations with ranges or values. More examples available on github.
Made a library? Written a blog post? Found a useful tutorial? Share it with the Ruby community here or just enjoy what everyone else has found!
https://github.com/igorkasyanchuk/calculate_in_group with this gem you can group and do aggregations with ranges or values. More examples available on github.
Post a comment