mirror of
https://github.com/we-promise/sure.git
synced 2026-04-25 06:54:07 +00:00
Add support to unlink lunch flow accounts (#318)
* Add support to unlink lunch flow accounts * add support to link and unlink to any provider * Fix tests and query * Let's keep Amr happy about his brand * Wrap unlink operations in a transaction and add error handling. * Fix tests --------- Co-authored-by: Juan José Mata <juanjo.mata@gmail.com>
This commit is contained in:
@@ -22,7 +22,11 @@ class Account < ApplicationRecord
|
||||
scope :assets, -> { where(classification: "asset") }
|
||||
scope :liabilities, -> { where(classification: "liability") }
|
||||
scope :alphabetically, -> { order(:name) }
|
||||
scope :manual, -> { left_joins(:account_providers).where(account_providers: { id: nil }) }
|
||||
scope :manual, -> {
|
||||
left_joins(:account_providers)
|
||||
.where(account_providers: { id: nil })
|
||||
.where(plaid_account_id: nil, simplefin_account_id: nil)
|
||||
}
|
||||
|
||||
has_one_attached :logo
|
||||
|
||||
|
||||
Reference in New Issue
Block a user