Sha256: 0e93b260faf514415d8a3ac2cb92e234681846e9ba30c971af9b8c7a33702e4a

Contents?: true

Size: 422 Bytes

Versions: 84

Compression:

Stored size: 422 Bytes

Contents

class InvocationProviderInputValue < ApplicationRecord
  belongs_to :template_invocation

  validates :name, :presence => true

  validates :value, :inclusion => { :in => proc { |v| v.provider_input.options_array } },
                    :if => proc { |v| v.provider_input.options_array.present? }

  def provider_input
    template_invocation.template.provider.provider_inputs.find { |item| item.name == name }
  end
end

Version data entries

84 entries across 84 versions & 1 rubygems

Version Path
foreman_remote_execution-10.0.3 app/models/invocation_provider_input_value.rb
foreman_remote_execution-10.0.2 app/models/invocation_provider_input_value.rb
foreman_remote_execution-10.0.1 app/models/invocation_provider_input_value.rb
foreman_remote_execution-10.0.0 app/models/invocation_provider_input_value.rb
foreman_remote_execution-8.3.0 app/models/invocation_provider_input_value.rb
foreman_remote_execution-9.1.0 app/models/invocation_provider_input_value.rb
foreman_remote_execution-8.2.1 app/models/invocation_provider_input_value.rb
foreman_remote_execution-8.2.0 app/models/invocation_provider_input_value.rb
foreman_remote_execution-9.0.1 app/models/invocation_provider_input_value.rb
foreman_remote_execution-9.0.0 app/models/invocation_provider_input_value.rb
foreman_remote_execution-8.1.2 app/models/invocation_provider_input_value.rb
foreman_remote_execution-8.1.1 app/models/invocation_provider_input_value.rb
foreman_remote_execution-8.1.0 app/models/invocation_provider_input_value.rb
foreman_remote_execution-7.2.2 app/models/invocation_provider_input_value.rb
foreman_remote_execution-7.2.1 app/models/invocation_provider_input_value.rb
foreman_remote_execution-7.2.0 app/models/invocation_provider_input_value.rb
foreman_remote_execution-5.0.8 app/models/invocation_provider_input_value.rb
foreman_remote_execution-8.0.0 app/models/invocation_provider_input_value.rb
foreman_remote_execution-7.1.1 app/models/invocation_provider_input_value.rb
foreman_remote_execution-7.1.0 app/models/invocation_provider_input_value.rb