Method: ForemanPuppet::Puppetclass#location_ids
- Defined in:
- app/models/foreman_puppet/puppetclass.rb
#location_ids ⇒ Object
For Audits to be correctly taxed for Puppetclass creation Puppetclass gets saved before the environment class and thus taxonomy ids are empty We collect the ids from unsaved environment_classes for the Audits correct taxation
81 82 83 |
# File 'app/models/foreman_puppet/puppetclass.rb', line 81 def location_ids environment_classes.select(&:new_record?).flat_map { |ec| ec.environment.location_ids }.concat(super).uniq end |