附件历史版本可以删除

This commit is contained in:
huang 2016-04-19 10:41:48 +08:00
parent 3b373a78fe
commit a907089bd0
1 changed files with 2 additions and 1 deletions

View File

@ -362,7 +362,8 @@ class Attachment < ActiveRecord::Base
#有了历史记录的数据记录是不能被删除的。
#true 能被删除 false 不能被删除
def destroyable
self.attachment_histories.count == 0
true
# self.attachment_histories.count == 0
end
# Returns file's location on disk