Revision 20cc5f65
Added by Tom Caspy over 8 years ago
app/models/host/managed.rb | ||
---|---|---|
scope :for_vm, ->(cr,vm) { where(:compute_resource_id => cr.id, :uuid => Array.wrap(vm).compact.map(&:identity)) }
|
||
|
||
# audit the changes to this model
|
||
audited :except => [:last_report, :puppet_status, :last_compile], :allow_mass_assignment => true
|
||
audited :except => [:last_report, :puppet_status, :last_compile, :lookup_value_matcher], :allow_mass_assignment => true
|
||
has_associated_audits
|
||
|
||
# some shortcuts
|
Also available in: Unified diff
fixes #11610 - removing a bunch of N+1 queries from the migration