1
0
Fork 0
mirror of https://github.com/maybe-finance/maybe.git synced 2025-07-22 14:49:38 +02:00
Maybe/app/models/valuation.rb

15 lines
229 B
Ruby
Raw Normal View History

class Valuation < ApplicationRecord
belongs_to :account
after_commit :sync_account
def trend(previous)
Trend.new(value, previous&.value)
end
private
def sync_account
self.account.sync_later
end
end