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