aliases/implications: fix conflicting definitions of active scope.
This commit is contained in:
@@ -15,7 +15,8 @@ class TagRelationship < ApplicationRecord
|
||||
has_one :antecedent_wiki, through: :antecedent_tag, source: :wiki_page
|
||||
has_one :consequent_wiki, through: :consequent_tag, source: :wiki_page
|
||||
|
||||
scope :active, ->{where(status: "active")}
|
||||
scope :active, ->{approved}
|
||||
scope :approved, ->{where(status: %w[active processing queued])}
|
||||
scope :deleted, ->{where(status: "deleted")}
|
||||
scope :expired, ->{where("created_at < ?", EXPIRY.days.ago)}
|
||||
scope :old, ->{where("created_at >= ? and created_at < ?", EXPIRY.days.ago, EXPIRY_WARNING.days.ago)}
|
||||
@@ -89,10 +90,6 @@ class TagRelationship < ApplicationRecord
|
||||
order(Arel.sql("array_position(array['queued', 'processing', 'pending', 'active', 'deleted', 'retired'], status) NULLS FIRST, antecedent_name, consequent_name"))
|
||||
end
|
||||
|
||||
def active
|
||||
where(status: %w[active processing queued])
|
||||
end
|
||||
|
||||
def default_order
|
||||
pending_first
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user