From 267d70bd52329b2b82f5adf756c02bab380476d2 Mon Sep 17 00:00:00 2001
From: evazion
Date: Thu, 23 Mar 2017 02:49:17 -0500
Subject: [PATCH] Fix #2931: mention automated implications on *_(cosplay)
wikis.
---
app/helpers/tags_helper.rb | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/app/helpers/tags_helper.rb b/app/helpers/tags_helper.rb
index 990f479fb..6497c80af 100644
--- a/app/helpers/tags_helper.rb
+++ b/app/helpers/tags_helper.rb
@@ -16,6 +16,13 @@ module TagsHelper
html << ".
"
end
+ automatic_tags = TagImplication.automatic_tags_for([tag.name])
+ if automatic_tags.any?
+ html << "This tag automatically adds "
+ html << raw(automatic_tags.map {|x| link_to(x, show_or_new_wiki_pages_path(:title => x))}.join(", "))
+ html << ".
"
+ end
+
if tag.antecedent_implications.any?
html << "This tag implicates "
html << raw(tag.antecedent_implications.map {|x| link_to(x.consequent_name, show_or_new_wiki_pages_path(:title => x.consequent_name))}.join(", "))