Sha256: 4094d92724de9ed4770ed406ec4869811b0310133d4d7c6ab7b502ef4369df14

Contents?: true

Size: 492 Bytes

Versions: 127

Compression:

Stored size: 492 Bytes

Contents

module ForemanRemoteExecution
  module TemplateOverrides
    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
  end
end

Version data entries

127 entries across 127 versions & 1 rubygems

Version Path
foreman_remote_execution-10.0.0 app/models/concerns/foreman_remote_execution/template_overrides.rb
foreman_remote_execution-8.3.0 app/models/concerns/foreman_remote_execution/template_overrides.rb
foreman_remote_execution-9.1.0 app/models/concerns/foreman_remote_execution/template_overrides.rb
foreman_remote_execution-8.2.1 app/models/concerns/foreman_remote_execution/template_overrides.rb
foreman_remote_execution-8.2.0 app/models/concerns/foreman_remote_execution/template_overrides.rb
foreman_remote_execution-9.0.1 app/models/concerns/foreman_remote_execution/template_overrides.rb
foreman_remote_execution-9.0.0 app/models/concerns/foreman_remote_execution/template_overrides.rb
foreman_remote_execution-8.1.2 app/models/concerns/foreman_remote_execution/template_overrides.rb
foreman_remote_execution-8.1.1 app/models/concerns/foreman_remote_execution/template_overrides.rb
foreman_remote_execution-8.1.0 app/models/concerns/foreman_remote_execution/template_overrides.rb
foreman_remote_execution-7.2.2 app/models/concerns/foreman_remote_execution/template_overrides.rb
foreman_remote_execution-7.2.1 app/models/concerns/foreman_remote_execution/template_overrides.rb
foreman_remote_execution-7.2.0 app/models/concerns/foreman_remote_execution/template_overrides.rb
foreman_remote_execution-5.0.8 app/models/concerns/foreman_remote_execution/template_overrides.rb
foreman_remote_execution-8.0.0 app/models/concerns/foreman_remote_execution/template_overrides.rb
foreman_remote_execution-7.1.1 app/models/concerns/foreman_remote_execution/template_overrides.rb
foreman_remote_execution-7.1.0 app/models/concerns/foreman_remote_execution/template_overrides.rb
foreman_remote_execution-7.0.0 app/models/concerns/foreman_remote_execution/template_overrides.rb
foreman_remote_execution-5.0.7 app/models/concerns/foreman_remote_execution/template_overrides.rb
foreman_remote_execution-5.0.6 app/models/concerns/foreman_remote_execution/template_overrides.rb