修改已发行版本的数量问题

This commit is contained in:
sylor_huang@126.com 2020-05-13 17:15:22 +08:00
parent 3e6ee91f9a
commit 96e03ac249
1 changed files with 1 additions and 1 deletions

View File

@ -2,6 +2,6 @@ class VersionRelease < ApplicationRecord
belongs_to :repository, counter_cache: true
belongs_to :user
has_many :project_trends, as: :trend, dependent: :destroy
scope :releases_size, ->{where(draft: false, prerelease: false)}
scope :releases_size, ->{where(draft: false, prerelease: false).size}
# has_many :attachments, as: :container, dependent: :destroy
end