Topic: Help with .each
Hi, I am using Higcharts to make some graphs on a rails app.
Highcharts data series are passed via array and I have a method on a model that returns a float.
I needed something like this:
Model.all.method_that_returns_floatIt didnt worked besause the .all returns me an array, so i did:
Model.all.each{|model|model.method} But it returned just an array of the objects and not the value of the method's calculation.