Module: ForemanRemoteExecution::TemplateOverrides
- Defined in:
- app/models/concerns/foreman_remote_execution/template_overrides.rb
Instance Method Summary collapse
Instance Method Details
#inputs_unchanged_when_locked ⇒ Object
3 4 5 6 7 8 9 |
# File 'app/models/concerns/foreman_remote_execution/template_overrides.rb', line 3 def inputs_unchanged_when_locked inputs_changed = template_inputs.any? { |input| input.changed? || input.new_record? } foreign_input_sets_changed = foreign_input_sets.any? { |input_set| input_set.changed? || input_set.new_record? } if inputs_changed || foreign_input_sets_changed errors.add(:base, _('This template is locked. Please clone it to a new template to customize.')) end end |