Topic: Substract 2 columns
Hello There, sorry for the newbie question, i'm starting to study rails and i'm doing a small web app that will count all the kilometers that i do in a day.
I want to put the inicial and the final kilometer each day but i want that the app substract the inicial from the final.
I've looked to activerecord math but it only shows max, count, sum and avg. How can i substract from two existing columns (:kminicial and :kmfinal)?
Thanks in advance and sorry for the lamme question.