Open bf4 opened 10 years ago
Comment by Onumis Monday Nov 11, 2013 at 18:26 GMT
Possible guilty: https://github.com/paulasmuth/fnordmetric/blob/master/fnordmetric-core/lib/fnordmetric/ext.rb#L42
Comment by Onumis Monday Nov 11, 2013 at 18:35 GMT
Another interesting fact: Doing:
Review.where(model_id: my_id).average(:foo)
works as intended (performs a SELECT AVG query)Model.find(my_id).reviews.average(:foo)
is trying to perform the mean
method added to ::Array in ext.rb
Issue by Onumis Monday Nov 11, 2013 at 18:12 GMT Originally opened as https://github.com/paulasmuth/fnordmetric/issues/169
I'm having a new error showing up after I updated FnordMetric from v0.7.5 to v1.2.9:
I can work around it by doing
@reviews.sum(:accuracy) / @reviews.count
, but this is a strange issue, and I wonder if you can help me on figuring out why this happens.(Using Rails 3.2.13)