budget/app/models/income.rb

8 lines
129 B
Ruby
Raw Normal View History

2022-11-20 16:02:41 -05:00
class Income < ApplicationRecord
belongs_to :member
2022-11-20 16:21:28 -05:00
def self.total
Income.where(included: true).sum(&:amount)
end
2022-11-20 16:02:41 -05:00
end