diff --git a/app/models/tag_relationship.rb b/app/models/tag_relationship.rb index dd6878ebc..eab13a645 100644 --- a/app/models/tag_relationship.rb +++ b/app/models/tag_relationship.rb @@ -60,11 +60,6 @@ class TagRelationship < ApplicationRecord where(status: status.downcase) end - def tag_matches(field, params) - return all if params.blank? - where(field => Tag.search(params).reorder(nil).select(:name)) - end - def search(params) 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) @@ -76,9 +71,6 @@ class TagRelationship < ApplicationRecord q = q.status_matches(params[:status]) end - q = q.tag_matches(:antecedent_name, params[:antecedent_tag]) - q = q.tag_matches(:consequent_name, params[:consequent_tag]) - if params[:category].present? q = q.joins(:consequent_tag).where("tags.category": params[:category].split) end