has_object_manager_attributes.rb 417 B

1234567891011121314
  1. # Copyright (C) 2012-2023 Zammad Foundation, https://zammad-foundation.org/
  2. module HasObjectManagerAttributes
  3. extend ActiveSupport::Concern
  4. included do
  5. # Disable table inheritance to allow columns with the name 'type'.
  6. self.inheritance_column = nil
  7. validates_with ObjectManager::Attribute::Validation, on: %i[create update]
  8. after_initialize ObjectManager::Attribute::SetDefaults.new
  9. end
  10. end