RubyFlow The Ruby and Rails community linklog

×

The Ruby and Rails community linklog

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!

active_hash_relation now supports aggregation queries!

Only for APIs: Sometimes we need to ask the database queries that act on the collection but don’t want back an array of elements but a value instead! Like average/max/min/sum of a column of our model. Create a new endpoint just for that? No! Now it can be done with just a simple method in active_hash_relation and then you can append the results to the meta attributes of your serializer. More here!.

Post a comment

You can use basic HTML markup (e.g. <a>) or Markdown.

As you are not logged in, you will be
directed via GitHub to signup or sign in