view - Rails subtract result for the previous result -
Thank you for the last reply in my questions - I have a problem showing my results I need to show the day After looking at the weight of my patients in the day - and I need to show more one column "weight loss" - this is the weight of the day - the weight of the previous day but this is my code
P table thread tray weight weighing th IMC: Weight weight: P strong peso: Abs - @ Do Mrijkvetkic | M | Tr td = m.date td = m.weight td = (m.weight / (@ patient.weight.first.inch ** 2) .to_f) .round (2) TD = m.weight - ????? Line I do not know how to do this, because there are many results and I do not know how I call the end result as a novel of real result - help me plz
You can use
- patient_weights = @ patient. Weight - Patients_wits each_vi_ index M, I Tr td = m.date td = m.weight td = (m.weight / (@ patient.weight.first.inch ** 2) .to_f) .round (2) TD = (i>?)? (M.weight-patient_wits [i-1]. Weight): "-"
Comments
Post a Comment