clones_ticket_article_attachments.rb 431 B

1234567891011121314
  1. # Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
  2. module ClonesTicketArticleAttachments
  3. extend ActiveSupport::Concern
  4. private
  5. def article_attachments_clone(article)
  6. raise Exceptions::UnprocessableEntity, __("Need 'form_id' to add attachments to new form.") if params[:form_id].blank?
  7. article.clone_attachments('UploadCache', params[:form_id], only_attached_attachments: true)
  8. end
  9. end