mirror of
https://github.com/we-promise/sure.git
synced 2026-04-19 12:04:08 +00:00
Rules: Alphabetize <select>s in new rule form (#280)
Co-authored-by: Juan José Mata <juanjo.mata@gmail.com>
This commit is contained in:
@@ -4,7 +4,7 @@ class Rule::ActionExecutor::SetTransactionCategory < Rule::ActionExecutor
|
||||
end
|
||||
|
||||
def options
|
||||
family.categories.pluck(:name, :id)
|
||||
family.categories.alphabetically.pluck(:name, :id)
|
||||
end
|
||||
|
||||
def execute(transaction_scope, value: nil, ignore_attribute_locks: false)
|
||||
|
||||
@@ -4,7 +4,7 @@ class Rule::ActionExecutor::SetTransactionMerchant < Rule::ActionExecutor
|
||||
end
|
||||
|
||||
def options
|
||||
family.merchants.pluck(:name, :id)
|
||||
family.merchants.alphabetically.pluck(:name, :id)
|
||||
end
|
||||
|
||||
def execute(transaction_scope, value: nil, ignore_attribute_locks: false)
|
||||
|
||||
@@ -4,7 +4,7 @@ class Rule::ActionExecutor::SetTransactionTags < Rule::ActionExecutor
|
||||
end
|
||||
|
||||
def options
|
||||
family.tags.pluck(:name, :id)
|
||||
family.tags.alphabetically.pluck(:name, :id)
|
||||
end
|
||||
|
||||
def execute(transaction_scope, value: nil, ignore_attribute_locks: false)
|
||||
|
||||
@@ -4,7 +4,7 @@ class Rule::ConditionFilter::TransactionMerchant < Rule::ConditionFilter
|
||||
end
|
||||
|
||||
def options
|
||||
family.assigned_merchants.pluck(:name, :id)
|
||||
family.assigned_merchants.alphabetically.pluck(:name, :id)
|
||||
end
|
||||
|
||||
def prepare(scope)
|
||||
|
||||
Reference in New Issue
Block a user