mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-07-28 09:39:39 +02:00
9 lines
273 B
Ruby
9 lines
273 B
Ruby
|
class Account::Balance < ApplicationRecord
|
||
|
include Monetizable
|
||
|
|
||
|
belongs_to :account
|
||
|
validates :account, :date, :balance, presence: true
|
||
|
monetize :balance
|
||
|
scope :in_period, ->(period) { period.date_range.nil? ? all : where(date: period.date_range) }
|
||
|
end
|