1
Hello I’m starting my studies with Ruby On Rails, and I’m making an application that manages expenses. Well what I need to do sum up all the expenses of the "value" column and show in the view.
I’m trying the following on Activerecord
def total
divida.sum("valor * ")
end
Would that be the right way? how do I show in the view?
Thanks for your attention!
Thank you, you helped me understand even better
– Aristóteles Coutinho