Sha256: ef0346575b02d8da2a8cc6127aeae5075c5e44b3a93b20e7011ce08247125815

Contents?: true

Size: 554 Bytes

Versions: 35

Compression:

Stored size: 554 Bytes

Contents

module VirtWhoTaxonomyExtensions
  extend ActiveSupport::Concern
  included do
    # the order is imporant here, around filter needs to disable audit creation, otherwise config deletion
    # creates audit during org deletion and creates foreign key issue, the relation must be defined later
    around_destroy :ignore_auditing_of_config
    has_many :configs, :dependent => :destroy, :class_name => 'ForemanVirtWhoConfigure::Config'

    def ignore_auditing_of_config
      ::ForemanVirtWhoConfigure::Config.without_auditing { yield }
    end
  end
end

Version data entries

35 entries across 35 versions & 1 rubygems

Version Path
foreman_virt_who_configure-0.5.25 app/models/concerns/virt_who_taxonomy_extensions.rb
foreman_virt_who_configure-0.5.24 app/models/concerns/virt_who_taxonomy_extensions.rb
foreman_virt_who_configure-0.5.23 app/models/concerns/virt_who_taxonomy_extensions.rb
foreman_virt_who_configure-0.5.21 app/models/concerns/virt_who_taxonomy_extensions.rb
foreman_virt_who_configure-0.5.20 app/models/concerns/virt_who_taxonomy_extensions.rb
foreman_virt_who_configure-0.5.19 app/models/concerns/virt_who_taxonomy_extensions.rb
foreman_virt_who_configure-0.5.18 app/models/concerns/virt_who_taxonomy_extensions.rb
foreman_virt_who_configure-0.5.17 app/models/concerns/virt_who_taxonomy_extensions.rb
foreman_virt_who_configure-0.5.16 app/models/concerns/virt_who_taxonomy_extensions.rb
foreman_virt_who_configure-0.5.15 app/models/concerns/virt_who_taxonomy_extensions.rb
foreman_virt_who_configure-0.5.14 app/models/concerns/virt_who_taxonomy_extensions.rb
foreman_virt_who_configure-0.5.13 app/models/concerns/virt_who_taxonomy_extensions.rb
foreman_virt_who_configure-0.5.12 app/models/concerns/virt_who_taxonomy_extensions.rb
foreman_virt_who_configure-0.5.11 app/models/concerns/virt_who_taxonomy_extensions.rb
foreman_virt_who_configure-0.5.10 app/models/concerns/virt_who_taxonomy_extensions.rb
foreman_virt_who_configure-0.5.9 app/models/concerns/virt_who_taxonomy_extensions.rb
foreman_virt_who_configure-0.5.8 app/models/concerns/virt_who_taxonomy_extensions.rb
foreman_virt_who_configure-0.5.7 app/models/concerns/virt_who_taxonomy_extensions.rb
foreman_virt_who_configure-0.5.6 app/models/concerns/virt_who_taxonomy_extensions.rb
foreman_virt_who_configure-0.5.5 app/models/concerns/virt_who_taxonomy_extensions.rb