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
80
81
82
83
84
85
|
# File 'app/models/template_invocation.rb', line 80
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
87
88
89
|
# File 'app/models/template_invocation.rb', line 87
def deep_clone!
deep_clone.tap(&:save!)
end
|
#template ⇒ Object
72
73
74
|
# File 'app/models/template_invocation.rb', line 72
def template
JobTemplate.unscoped { super }
end
|
76
77
78
|
# File 'app/models/template_invocation.rb', line 76
def to_action_input
{ :id => id, :name => template.name }
end
|