Sha256: b4573bf36d668fd41ff984cb5a22e58f000515d1577fea87d7f7e0e6eb55f7c2

Contents?: true

Size: 370 Bytes

Versions: 19

Compression:

Stored size: 370 Bytes

Contents

module ForemanSalt
  class SaltModuleEnvironment < ActiveRecord::Base
    belongs_to :salt_environment
    belongs_to :salt_module

    before_destroy :remove_from_hosts

    private

    def remove_from_hosts
      HostSaltModule.joins(:host).where(:hosts => { :salt_environment_id => salt_environment_id }, :salt_module_id => salt_module_id).destroy
    end
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
foreman_salt-8.0.4 app/models/foreman_salt/salt_module_environment.rb
foreman_salt-8.0.3 app/models/foreman_salt/salt_module_environment.rb
foreman_salt-8.0.2 app/models/foreman_salt/salt_module_environment.rb
foreman_salt-8.0.1 app/models/foreman_salt/salt_module_environment.rb
foreman_salt-7.0.3 app/models/foreman_salt/salt_module_environment.rb
foreman_salt-8.0.0 app/models/foreman_salt/salt_module_environment.rb
foreman_salt-7.0.2 app/models/foreman_salt/salt_module_environment.rb
foreman_salt-6.0.1 app/models/foreman_salt/salt_module_environment.rb
foreman_salt-7.0.1 app/models/foreman_salt/salt_module_environment.rb
foreman_salt-7.0.0 app/models/foreman_salt/salt_module_environment.rb
foreman_salt-6.0.0 app/models/foreman_salt/salt_module_environment.rb
foreman_salt-5.0.1 app/models/foreman_salt/salt_module_environment.rb
foreman_salt-5.0.0 app/models/foreman_salt/salt_module_environment.rb
foreman_salt-4.0.1 app/models/foreman_salt/salt_module_environment.rb
foreman_salt-4.0.0 app/models/foreman_salt/salt_module_environment.rb
foreman_salt-3.0.2 app/models/foreman_salt/salt_module_environment.rb
foreman_salt-3.0.1 app/models/foreman_salt/salt_module_environment.rb
foreman_salt-3.0.0 app/models/foreman_salt/salt_module_environment.rb
foreman_salt-2.1.0 app/models/foreman_salt/salt_module_environment.rb