Sha256: 8a7e4fbae70491bcae08a292e211fc422cd5fcc343816fbe7b20bc6a1351084a

Contents?: true

Size: 438 Bytes

Versions: 16

Compression:

Stored size: 438 Bytes

Contents

class TemplateInvocationInputValue < ApplicationRecord

  belongs_to :template_invocation
  belongs_to :template_input

  validates :value, :presence => true, :if => proc { |v| v.template_input.required? || v.value.nil? }

  validates :value, :inclusion => { :in => proc { |v| v.template_input.options_array } },
                    :if => proc { |v| v.template_input.input_type == 'user' && v.template_input.options_array.present? }
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
foreman_remote_execution-1.5.6 app/models/template_invocation_input_value.rb
foreman_remote_execution-1.6.3 app/models/template_invocation_input_value.rb
foreman_remote_execution-1.6.2 app/models/template_invocation_input_value.rb
foreman_remote_execution-1.5.5 app/models/template_invocation_input_value.rb
foreman_remote_execution-1.6.1 app/models/template_invocation_input_value.rb
foreman_remote_execution-1.6.0 app/models/template_invocation_input_value.rb
foreman_remote_execution-1.5.4 app/models/template_invocation_input_value.rb
foreman_remote_execution-1.5.3 app/models/template_invocation_input_value.rb
foreman_remote_execution-1.5.2 app/models/template_invocation_input_value.rb
foreman_remote_execution-1.5.1 app/models/template_invocation_input_value.rb
foreman_remote_execution-1.5.0 app/models/template_invocation_input_value.rb
foreman_remote_execution-1.4.6 app/models/template_invocation_input_value.rb
foreman_remote_execution-1.4.5 app/models/template_invocation_input_value.rb
foreman_remote_execution-1.4.4 app/models/template_invocation_input_value.rb
foreman_remote_execution-1.4.3 app/models/template_invocation_input_value.rb
foreman_remote_execution-1.4.2 app/models/template_invocation_input_value.rb