Sha256: d3421c946a61e04575d6e920cb66b182a15ee2fc447381149a84f84d96d72aea

Contents?: true

Size: 415 Bytes

Versions: 1

Compression:

Stored size: 415 Bytes

Contents

module ForemanAnsible
  # Relations to make Host::Managed 'have' ansible roles
  module HostManagedExtensions
    extend ActiveSupport::Concern

    included do
      has_many :host_ansible_roles, :foreign_key => :host_id
      has_many :ansible_roles, :through => :host_ansible_roles,
                               :dependent => :destroy

      attr_accessible :ansible_role_ids, :ansible_roles
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
foreman_ansible-1.0 app/models/concerns/foreman_ansible/host_managed_extensions.rb