|
|
|
@ -221,8 +221,10 @@ class FilesController < ApplicationController
|
|
|
|
|
@new_attachment_history = @old_attachment.become_history
|
|
|
|
|
@new_attachment_history.save!
|
|
|
|
|
|
|
|
|
|
old_course_second_category_id = @old_attachment.course_second_category_id
|
|
|
|
|
@old_attachment.copy_attributes_from_new_attachment(@new_attachment)
|
|
|
|
|
@old_attachment.is_public = is_public == true ? 1 : 0 if is_public
|
|
|
|
|
@old_attachment.course_second_category_id = old_course_second_category_id
|
|
|
|
|
@old_attachment.save!
|
|
|
|
|
@new_attachment.delete
|
|
|
|
|
end
|
|
|
|
|