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-14.1.4 app/models/concerns/foreman_remote_execution/template_overrides.rb
foreman_remote_execution-14.1.3 app/models/concerns/foreman_remote_execution/template_overrides.rb
foreman_remote_execution-14.1.2 app/models/concerns/foreman_remote_execution/template_overrides.rb
foreman_remote_execution-14.1.1 app/models/concerns/foreman_remote_execution/template_overrides.rb
foreman_remote_execution-14.1.0 app/models/concerns/foreman_remote_execution/template_overrides.rb
foreman_remote_execution-14.0.2 app/models/concerns/foreman_remote_execution/template_overrides.rb
foreman_remote_execution-14.0.1 app/models/concerns/foreman_remote_execution/template_overrides.rb
foreman_remote_execution-13.2.6 app/models/concerns/foreman_remote_execution/template_overrides.rb
foreman_remote_execution-14.0.0 app/models/concerns/foreman_remote_execution/template_overrides.rb
foreman_remote_execution-13.2.5 app/models/concerns/foreman_remote_execution/template_overrides.rb
foreman_remote_execution-13.2.4 app/models/concerns/foreman_remote_execution/template_overrides.rb
foreman_remote_execution-13.2.3 app/models/concerns/foreman_remote_execution/template_overrides.rb
foreman_remote_execution-13.2.2 app/models/concerns/foreman_remote_execution/template_overrides.rb
foreman_remote_execution-12.0.7 app/models/concerns/foreman_remote_execution/template_overrides.rb
foreman_remote_execution-13.2.1 app/models/concerns/foreman_remote_execution/template_overrides.rb
foreman_remote_execution-13.2.0 app/models/concerns/foreman_remote_execution/template_overrides.rb
foreman_remote_execution-10.1.3 app/models/concerns/foreman_remote_execution/template_overrides.rb
foreman_remote_execution-13.0.0 app/models/concerns/foreman_remote_execution/template_overrides.rb
foreman_remote_execution-12.0.5 app/models/concerns/foreman_remote_execution/template_overrides.rb
foreman_remote_execution-12.0.4 app/models/concerns/foreman_remote_execution/template_overrides.rb