tag relationships: fix typo in consequent_wiki association.
The consequent_wiki association incorrectly used the antecedent wiki. This caused wiki conflict errors when approving aliases.
This commit is contained in:
@@ -13,7 +13,7 @@ class TagRelationship < ApplicationRecord
|
||||
belongs_to :antecedent_tag, class_name: "Tag", foreign_key: "antecedent_name", primary_key: "name", default: -> { Tag.find_or_create_by_name(antecedent_name) }
|
||||
belongs_to :consequent_tag, class_name: "Tag", foreign_key: "consequent_name", primary_key: "name", default: -> { Tag.find_or_create_by_name(consequent_name) }
|
||||
belongs_to :antecedent_wiki, class_name: "WikiPage", foreign_key: "antecedent_name", primary_key: "title", optional: true
|
||||
belongs_to :consequent_wiki, class_name: "WikiPage", foreign_key: "antecedent_name", primary_key: "title", optional: true
|
||||
belongs_to :consequent_wiki, class_name: "WikiPage", foreign_key: "consequent_name", primary_key: "title", optional: true
|
||||
|
||||
scope :active, -> {approved}
|
||||
scope :approved, -> {where(status: %w[active processing queued])}
|
||||
|
||||
Reference in New Issue
Block a user