zammad/app/models/concerns/has_object_manager_attributes.rb
2026-01-02 15:41:09 +02:00

14 lines
427 B
Ruby

# Copyright (C) 2012-2026 Zammad Foundation, https://zammad-foundation.org/
module HasObjectManagerAttributes
extend ActiveSupport::Concern
included do
# Disable table inheritance to allow columns with the name 'type'.
self.inheritance_column = nil
validates_with Validations::ObjectManager::AttributeValidator, on: %i[create update]
after_initialize ObjectManager::Attribute::SetDefaults.new
end
end