shared_draft_start.rb 661 B

1234567891011121314151617181920212223242526
  1. # Copyright (C) 2012-2023 Zammad Foundation, https://zammad-foundation.org/
  2. class Ticket::SharedDraftStart < ApplicationModel
  3. include CanCloneAttachments
  4. include ChecksClientNotification
  5. belongs_to :group
  6. belongs_to :created_by, class_name: 'User'
  7. belongs_to :updated_by, class_name: 'User'
  8. validates :name, presence: true
  9. store :content
  10. # don't include content into assets which may be huge
  11. # assets are used to load the whole list of available drafts
  12. # content is loaded separately
  13. def filter_attributes(attributes)
  14. super.except! 'content'
  15. end
  16. # required by CanCloneAttachments
  17. def content_type
  18. 'text/html'
  19. end
  20. end