mirror of
https://github.com/we-promise/sure.git
synced 2026-04-19 03:54:08 +00:00
Fix rule condition merchant dropdown to show all merchants (#1240)
The "transaction merchant" condition filter used `family.assigned_merchants` which only returned merchants already assigned to a transaction. This meant newly created merchants wouldn't appear in the rule condition dropdown until manually assigned to a transaction. Changed to `family.available_merchants` which includes all family merchants (even unassigned ones), provider merchants on transactions, and recently unlinked merchants — consistent with the transaction form merchant selector. Fixes #1197 Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -4,7 +4,7 @@ class Rule::ConditionFilter::TransactionMerchant < Rule::ConditionFilter
|
|||||||
end
|
end
|
||||||
|
|
||||||
def options
|
def options
|
||||||
family.assigned_merchants.alphabetically.pluck(:name, :id)
|
family.available_merchants.alphabetically.pluck(:name, :id)
|
||||||
end
|
end
|
||||||
|
|
||||||
def prepare(scope)
|
def prepare(scope)
|
||||||
|
|||||||
Reference in New Issue
Block a user