unset_attributes.rb 387 B

12345678910111213141516171819
  1. # Copyright (C) 2012-2022 Zammad Foundation, https://zammad-foundation.org/
  2. class Sequencer
  3. class Unit
  4. module Common
  5. class UnsetAttributes < Sequencer::Unit::Base
  6. def process
  7. uses = self.class.uses
  8. return if uses.blank?
  9. uses.each do |attribute|
  10. state.unset(attribute)
  11. end
  12. end
  13. end
  14. end
  15. end
  16. end