|
|
|
@ -115,7 +115,7 @@ class Attachment < ApplicationRecord
|
|
|
|
|
|
|
|
|
|
def become_history
|
|
|
|
|
history = self.attachment_histories.first
|
|
|
|
|
new_attachment_history = AttachmentHistory.new(self.attributes.except("id", "resource_bank_id", "unified_setting", "course_second_category_id", "delay_publish").merge(
|
|
|
|
|
new_attachment_history = AttachmentHistory.new(self.attributes.except("id", "resource_bank_id", "unified_setting", "course_second_category_id", "delay_publish", "link").merge(
|
|
|
|
|
attachment_id: self.id,
|
|
|
|
|
version: history.nil? ? 1 : history.version + 1,
|
|
|
|
|
))
|
|
|
|
|