更新历史版本,下载次数,引用次数不清零

This commit is contained in:
huang 2016-03-08 11:26:55 +08:00
parent 38fca02193
commit ec4a3b321c
1 changed files with 1 additions and 1 deletions

View File

@ -251,7 +251,7 @@ class AttachmentsController < ApplicationController
@history.version = @old_history.nil? ? 1 : @old_history.version + 1
@history.save #历史记录保存完毕
#将最新保存的记录 数据替换到 需要修改的文件记录
@old_attachment.attributes = @attachment.attributes.dup.except("id","container_id","container_type","is_public","downloads")
@old_attachment.attributes = @attachment.attributes.dup.except("id","container_id","container_type","is_public","downloads", "quotes")
@old_attachment.save
#删除当前记录
@attachment.delete