mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-07-24 23:59:40 +02:00
* Add backend support for transaction categories * Fix tests * Localize default category names * Add tests * Remove category icon and set default color
12 lines
204 B
Ruby
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
|