mirror of
https://github.com/we-promise/sure.git
synced 2026-04-19 12:04:08 +00:00
Add scope to filter transactions from active accounts (#1810)
* Add scope to filter transactions from active accounts * Add test for transfer match candidates with active accounts * Refactor active account filtering for transactions and entries
This commit is contained in:
@@ -24,6 +24,10 @@ class Account::Entry < ApplicationRecord
|
||||
)
|
||||
}
|
||||
|
||||
scope :active, -> {
|
||||
joins(:account).where(accounts: { is_active: true, scheduled_for_deletion: false })
|
||||
}
|
||||
|
||||
scope :reverse_chronological, -> {
|
||||
order(
|
||||
date: :desc,
|
||||
|
||||
Reference in New Issue
Block a user