Sha256: 69d50101aa4fffce303492923cf6a34bd943f943ef2217fc76d98958c0f9dbdb

Contents?: true

Size: 558 Bytes

Versions: 7

Compression:

Stored size: 558 Bytes

Contents

module ForemanPatch
  module Concerns
    module HostManagedExtensions
      extend ActiveSupport::Concern

      included do
        has_many :invocations, -> { unscope(:order) }, class_name: 'ForemanPatch::Invocation', foreign_key: :host_id, dependent: :delete_all
        has_many :rounds, class_name: 'ForemanPatch::Round', through: :invocations
        has_many :windows, class_name: 'ForemanPatch::Window', through: :rounds

        scoped_search relation: :rounds, on: :id, complete_value: false, rename: :patch_round_id
      end

    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
foreman_patch-1.2.0.alpha1 app/models/foreman_patch/concerns/host_managed_extensions.rb
foreman_patch-1.1.6.alpha5 app/models/foreman_patch/concerns/host_managed_extensions.rb
foreman_patch-1.1.6.alpha4 app/models/foreman_patch/concerns/host_managed_extensions.rb
foreman_patch-1.1.5 app/models/foreman_patch/concerns/host_managed_extensions.rb
foreman_patch-1.1.4 app/models/foreman_patch/concerns/host_managed_extensions.rb
foreman_patch-1.1.3 app/models/foreman_patch/concerns/host_managed_extensions.rb
foreman_patch-1.1.1 app/models/foreman_patch/concerns/host_managed_extensions.rb