Sha256: c3a2d28732aa96dae63e7cd0e22ee67d6c4da830bf4defc0e66e45f29e9e5f92

Contents?: true

Size: 439 Bytes

Versions: 26

Compression:

Stored size: 439 Bytes

Contents

class TemplateInvocationInputValue < ActiveRecord::Base

  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

26 entries across 26 versions & 1 rubygems

Version Path
foreman_remote_execution-1.3.7 app/models/template_invocation_input_value.rb
foreman_remote_execution-1.3.6 app/models/template_invocation_input_value.rb
foreman_remote_execution-1.4.1 app/models/template_invocation_input_value.rb
foreman_remote_execution-1.3.5 app/models/template_invocation_input_value.rb
foreman_remote_execution-1.3.4 app/models/template_invocation_input_value.rb
foreman_remote_execution-1.3.3 app/models/template_invocation_input_value.rb
foreman_remote_execution-1.3.2 app/models/template_invocation_input_value.rb
foreman_remote_execution-1.3.1 app/models/template_invocation_input_value.rb
foreman_remote_execution-1.3.0 app/models/template_invocation_input_value.rb
foreman_remote_execution-1.2.2 app/models/template_invocation_input_value.rb
foreman_remote_execution-1.2.1 app/models/template_invocation_input_value.rb
foreman_remote_execution-1.2.0 app/models/template_invocation_input_value.rb
foreman_remote_execution-1.1.1 app/models/template_invocation_input_value.rb
foreman_remote_execution-1.1.0 app/models/template_invocation_input_value.rb
foreman_remote_execution-1.0.0 app/models/template_invocation_input_value.rb
foreman_remote_execution-0.3.2 app/models/template_invocation_input_value.rb
foreman_remote_execution-0.3.1 app/models/template_invocation_input_value.rb
foreman_remote_execution-0.3.0 app/models/template_invocation_input_value.rb
foreman_remote_execution-0.2.3 app/models/template_invocation_input_value.rb
foreman_remote_execution-0.2.2 app/models/template_invocation_input_value.rb