Sha256: bd651692eceddf770841909b67fd3b33f7ae656a9dd5775fabff7613e1c81bce

Contents?: true

Size: 420 Bytes

Versions: 3

Compression:

Stored size: 420 Bytes

Contents

module ForemanPuppet
  module Extensions
    module Taxonomy
      extend ActiveSupport::Concern

      included do
        has_many :environments, through: :taxable_taxonomies, source: :taxable, source_type: 'ForemanPuppet::Environment'

        has_many :puppetclasses, through: :environments
      end

      def dup
        new = super
        new.environments = environments
        new
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
foreman_puppet-0.1.0 app/models/concerns/foreman_puppet/extensions/taxonomy.rb
foreman_puppet-0.0.2 app/models/concerns/foreman_puppet/extensions/taxonomy.rb
foreman_puppet-0.0.1 app/models/concerns/foreman_puppet/extensions/taxonomy.rb