proper fix for #725
show all antecedent implications on wiki instead of just the first
This commit is contained in:
@@ -25,8 +25,8 @@ class WikiPagePresenter
|
||||
@consequent_tag_implications ||= TagImplication.where("status = 'active' and consequent_name = ?", wiki_page.title).all
|
||||
end
|
||||
|
||||
def antecedent_tag_implication
|
||||
@antecedent_tag_implication ||= TagImplication.where("status = 'active' and antecedent_name = ?", wiki_page.title).first
|
||||
def antecedent_tag_implications
|
||||
@antecedent_tag_implications ||= TagImplication.where("status = 'active' and antecedent_name = ?", wiki_page.title).all
|
||||
end
|
||||
|
||||
# Produce a formatted page that shows the difference between two versions of a page.
|
||||
|
||||
@@ -23,8 +23,8 @@
|
||||
<p class="hint">The following tags are aliased to this tag: <%= raw @wiki_page.presenter.consequent_tag_aliases.map {|x| link_to(x.antecedent_name, posts_path(:tags => x.antecedent_name))}.join(", ") %>.</p>
|
||||
<% end %>
|
||||
|
||||
<% if @wiki_page.presenter.antecedent_tag_implication %>
|
||||
<p class="hint">This tag has been implicated to <%= link_to @wiki_page.presenter.antecedent_tag_implication.consequent_name, posts_path(:tags => @wiki_page.presenter.antecedent_tag_implication.consequent_name) %>.</p>
|
||||
<% if @wiki_page.presenter.antecedent_tag_implications %>
|
||||
<p class="hint">This tag has been implicated to <%= raw @wiki_page.presenter.antecedent_tag_implications.map {|x| link_to(x.consequent_name, posts_path(:tags => x.consequent_name))}.join(", ") %>.</p>
|
||||
<% end %>
|
||||
|
||||
<% if @wiki_page.presenter.consequent_tag_implications.any? %>
|
||||
|
||||
Reference in New Issue
Block a user