trabajo-afectivo/app/controllers/concerns/clones_ticket_article_attachments.rb
2022-01-18 13:52:57 +01:00

14 lines
431 B
Ruby

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