You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After merging #305, all balances displayed in the app are calculated with a mix of #seconds_to_hm plus some conditional logic. This is not as readable as a call to a #time_balance method would be.
Moreover, this is something would be better off done by postgres: balance * interval '1 sec'. I did a bit of investigation some days ago and I didn't find a way to do this through ActiveRecord. I'd be good to give it another look, because it seems like the optimal solution.
If that is indeed not possible, we need to implement a #time_balance that at least hides the complexity of the current calculation.
The text was updated successfully, but these errors were encountered:
After merging #305, all balances displayed in the app are calculated with a mix of
#seconds_to_hm
plus some conditional logic. This is not as readable as a call to a#time_balance
method would be.Moreover, this is something would be better off done by postgres:
balance * interval '1 sec'
. I did a bit of investigation some days ago and I didn't find a way to do this through ActiveRecord. I'd be good to give it another look, because it seems like the optimal solution.If that is indeed not possible, we need to implement a
#time_balance
that at least hides the complexity of the current calculation.The text was updated successfully, but these errors were encountered: