mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-07-24 07:39:39 +02:00
* Clean up time series models * Add value group rollup class for summarizing hierarchical data * Integrate new classes * Update UI to use new patterns * Update D3 charts to expect new data format * Clean up account model * More cleanup * Money improvements * Use new money fields * Remove invalid fixture data to avoid orphaned accountables * Update time series to work better with collections * Fix tests and UI bugs
9 lines
262 B
Ruby
9 lines
262 B
Ruby
class AccountBalance < 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
|