1
0
Fork 0
mirror of https://github.com/maybe-finance/maybe.git synced 2025-07-24 23:59:40 +02:00
Maybe/app/models/transaction.rb
Jakub Kottnauer 90d0cc0c39
Add backend support for transaction categories (#524)
* Add backend support for transaction categories

* Fix tests

* Localize default category names

* Add tests

* Remove category icon and set default color
2024-03-07 13:15:50 -05:00

12 lines
204 B
Ruby

class Transaction < ApplicationRecord
belongs_to :account
belongs_to :category, optional: true
after_commit :sync_account
private
def sync_account
self.account.sync_later
end
end