Refactors shared/_tags view to always take a param called taggable
This commit is contained in:
@@ -18,7 +18,7 @@
|
||||
<%= link_to debate.description, debate %>
|
||||
<div class="truncate"></div>
|
||||
</div>
|
||||
<%= render "shared/tags", debate: debate, limit: 5 %>
|
||||
<%= render "shared/tags", taggable: debate, limit: 5 %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
|
||||
<%= safe_html_with_links @debate.description %>
|
||||
|
||||
<%= render 'shared/tags', debate: @debate %>
|
||||
<%= render 'shared/tags', taggable: @debate %>
|
||||
|
||||
<div class='js-moderator-debate-actions'>
|
||||
<%= render 'actions', debate: @debate %>
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
<%= link_to proposal.summary, proposal %>
|
||||
<div class="truncate"></div>
|
||||
</div>
|
||||
<%= render "shared/tags", proposal: proposal, limit: 5 %>
|
||||
<%= render "shared/tags", taggable: proposal, limit: 5 %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -74,7 +74,7 @@
|
||||
|
||||
<h4><%= @proposal.question %></h4>
|
||||
|
||||
<%= render 'shared/tags', proposal: @proposal %>
|
||||
<%= render 'shared/tags', taggable: @proposal %>
|
||||
|
||||
<div class='js-moderator-proposal-actions'>
|
||||
<%= render 'actions', proposal: @proposal %>
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
<%- limit ||= nil %>
|
||||
<%- taggable = defined?(debate) ? debate : proposal %>
|
||||
|
||||
<% if taggable.tags.any? %>
|
||||
<span class='tags'>
|
||||
|
||||
Reference in New Issue
Block a user