How can I find the object associated with the results of an ActiveRecord Calculation rather than a value?
For example I have @parent which has many children. I would lik
This is my personal favorite when it comes to readability, by using ruby's #max_by :
@parent.children.max_by(&:value)