mirror of
https://github.com/we-promise/sure.git
synced 2026-04-24 22:44:14 +00:00
Add more descriptive labels to rule rows
This commit is contained in:
@@ -11,6 +11,18 @@ class Rule::Action < ApplicationRecord
|
||||
executor.options
|
||||
end
|
||||
|
||||
def value_display
|
||||
if value.present?
|
||||
if options
|
||||
options.find { |option| option.last == value }&.first
|
||||
else
|
||||
""
|
||||
end
|
||||
else
|
||||
""
|
||||
end
|
||||
end
|
||||
|
||||
def executor
|
||||
rule.registry.get_executor!(action_type)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user