mirror of
https://github.com/we-promise/sure.git
synced 2026-04-07 06:21:23 +00:00
* Minimal code style enforcement * Formatting and lint code updates (no change in functionality)
10 lines
307 B
Ruby
10 lines
307 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) }
|
|
scope :chronological, -> { order(:date) }
|
|
end
|