2022-01-01 13:38:12 +00:00
|
|
|
# Copyright (C) 2012-2022 Zammad Foundation, https://zammad-foundation.org/
|
2021-08-17 16:37:16 +00:00
|
|
|
|
|
|
|
module HasObjectManagerAttributes
|
|
|
|
extend ActiveSupport::Concern
|
|
|
|
|
|
|
|
included do
|
|
|
|
# Disable table inheritance to allow columns with the name 'type'.
|
|
|
|
self.inheritance_column = nil
|
|
|
|
|
|
|
|
validates_with ObjectManager::Attribute::Validation, on: %i[create update]
|
|
|
|
|
|
|
|
after_initialize ObjectManager::Attribute::SetDefaults.new
|
|
|
|
end
|
|
|
|
end
|