models: rename post/pool archives to post/pool versions.
This commit is contained in:
@@ -118,8 +118,8 @@ class Pool < ApplicationRecord
|
||||
end
|
||||
|
||||
def versions
|
||||
if PoolArchive.enabled?
|
||||
PoolArchive.where("pool_id = ?", id).order("id asc")
|
||||
if PoolVersion.enabled?
|
||||
PoolVersion.where("pool_id = ?", id).order("id asc")
|
||||
else
|
||||
raise "Archive service not configured"
|
||||
end
|
||||
@@ -268,8 +268,8 @@ class Pool < ApplicationRecord
|
||||
end
|
||||
|
||||
def create_version(updater: CurrentUser.user, updater_ip_addr: CurrentUser.ip_addr)
|
||||
if PoolArchive.enabled?
|
||||
PoolArchive.queue(self, updater, updater_ip_addr)
|
||||
if PoolVersion.enabled?
|
||||
PoolVersion.queue(self, updater, updater_ip_addr)
|
||||
else
|
||||
Rails.logger.warn("Archive service is not configured. Pool versions will not be saved.")
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user