shared_draft_start.rb 611 B

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