signature.rb 451 B

12345678910111213141516
  1. # Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
  2. class Signature < ApplicationModel
  3. include HasDefaultModelUserRelations
  4. include ChecksHtmlSanitized
  5. include HasCollectionUpdate
  6. has_many :groups, after_add: :cache_update, after_remove: :cache_update
  7. validates :name, presence: true
  8. validates :note, length: { maximum: 250 }
  9. sanitized_html :body, :note
  10. collection_push_permission('ticket.agent')
  11. end