Class: TemplateInvocation
Defined Under Namespace
Classes: TaskResultMap
Constant Summary
collapse
- FLATTENED_ERRORS_MAPPING =
{ :input_values => lambda do |input_value|
_('Input') + " #{input_value.template_input.name}"
end }.freeze
Instance Method Summary
collapse
#flattened_errors, #flattened_validation_exception
Instance Method Details
#deep_clone ⇒ Object
83
84
85
86
87
88
|
# File 'app/models/template_invocation.rb', line 83
def deep_clone
self.dup.tap do |invocation|
invocation.input_values = self.input_values.map(&:dup)
invocation.provider_input_values = self.provider_input_values.map(&:dup)
end
end
|
#deep_clone! ⇒ Object
90
91
92
|
# File 'app/models/template_invocation.rb', line 90
def deep_clone!
deep_clone.tap(&:save!)
end
|
#template ⇒ Object
75
76
77
|
# File 'app/models/template_invocation.rb', line 75
def template
JobTemplate.unscoped { super }
end
|
79
80
81
|
# File 'app/models/template_invocation.rb', line 79
def to_action_input
{ :id => id, :name => template.name }
end
|