1
0
Fork 0
mirror of https://github.com/maybe-finance/maybe.git synced 2025-08-02 20:15:22 +02:00

Fix budget edit button

This commit is contained in:
Zach Gollwitzer 2025-01-16 16:24:14 -05:00
parent e1d3c7a4a1
commit 60f1a1e2d2
2 changed files with 6 additions and 4 deletions

View file

@ -139,7 +139,7 @@ class Budget < ApplicationRecord
end
def allocated_percent
return 0 unless budgeted_spending > 0
return 0 unless budgeted_spending && budgeted_spending > 0
(allocated_spending / budgeted_spending.to_f) * 100
end