models: rename post/pool archives to post/pool versions.

This commit is contained in:
evazion
2020-02-15 06:52:10 -06:00
parent 51f3f7338a
commit 60ff2ae929
27 changed files with 71 additions and 84 deletions

View File

@@ -107,7 +107,7 @@ class User < ApplicationRecord
has_many :post_disapprovals, :dependent => :destroy
has_many :post_flags, foreign_key: :creator_id
has_many :post_votes
has_many :post_versions, class_name: "PostArchive", foreign_key: :updater_id
has_many :post_versions, foreign_key: :updater_id
has_many :bans, -> {order("bans.id desc")}
has_one :recent_ban, -> {order("bans.id desc")}, :class_name => "Ban"
@@ -587,8 +587,8 @@ class User < ApplicationRecord
end
def pool_version_count
return nil unless PoolArchive.enabled?
PoolArchive.for_user(id).count
return nil unless PoolVersion.enabled?
PoolVersion.for_user(id).count
end
def forum_post_count