mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-07-20 21:59:38 +02:00
* Isolate infinite loop bug, add timeout to actions * Increase timeout to allow for temporary failure * Set correct timeout, implement temporary fix * Trigger syncs at controller layer
13 lines
330 B
Ruby
13 lines
330 B
Ruby
class Valuation < ApplicationRecord
|
|
include Monetizable
|
|
|
|
belongs_to :account
|
|
validates :account, :date, :value, presence: true
|
|
monetize :value
|
|
|
|
scope :in_period, ->(period) { period.date_range.nil? ? all : where(date: period.date_range) }
|
|
|
|
def self.to_series
|
|
TimeSeries.from_collection all, :value_money
|
|
end
|
|
end
|