aliases/implications: add back legacy reason field.
In Danbooru 1, aliases (and implications) had a `reason` field where either the admin or the alias requester gave a reason for the alias. This field was removed from the code and the database schema, but it still existed in the production database. This adds the field back, so that the dev schema is consistent with the production schema, and so that legacy reasons can be viewed on site again. * Add back legacy tag_aliases.reason and tag_implications.reason field. * Make /tag_aliases and /tag_implications show legacy reasons. * Add the reason field to the search form.
This commit is contained in:
@@ -66,7 +66,7 @@ class TagRelationship < ApplicationRecord
|
||||
end
|
||||
|
||||
def search(params)
|
||||
q = search_attributes(params, :id, :created_at, :updated_at, :antecedent_name, :consequent_name, :creator, :approver, :forum_post, :forum_topic, :antecedent_tag, :consequent_tag, :antecedent_wiki, :consequent_wiki)
|
||||
q = search_attributes(params, :id, :created_at, :updated_at, :antecedent_name, :consequent_name, :reason, :creator, :approver, :forum_post, :forum_topic, :antecedent_tag, :consequent_tag, :antecedent_wiki, :consequent_wiki)
|
||||
|
||||
if params[:name_matches].present?
|
||||
q = q.name_matches(params[:name_matches])
|
||||
|
||||
Reference in New Issue
Block a user