tags: eliminate Tag.category_for method.
Tag.category_for looked up a tag's category in the Redis cache. This was only used in a few places (in related tags, and on the popular/missed search pages). Get rid of this method so we can work towards getting rid of caching tag categories in Redis.
This commit is contained in:
@@ -15,11 +15,11 @@
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% @missed_searches.each do |tags, count| %>
|
||||
<tr class="tag-type-<%= Tag.category_for(tags) %>">
|
||||
<td><%= link_to tags, posts_path(:tags => tags) %></td>
|
||||
<% @missed_searches.each do |search, count| %>
|
||||
<tr class="tag-type-<%= Tag.find_by_name(search)&.category.to_i %>">
|
||||
<td><%= link_to search, posts_path(tags: search) %></td>
|
||||
<td>
|
||||
<% unless WikiPage.titled(tags).exists? %>
|
||||
<% unless WikiPage.titled(search).exists? %>
|
||||
N
|
||||
<% end %>
|
||||
</td>
|
||||
|
||||
@@ -13,9 +13,9 @@
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% @searches.each do |tags, count| %>
|
||||
<tr class="tag-type-<%= Tag.category_for(tags) %>">
|
||||
<td><%= link_to tags, posts_path(:tags => tags) %></td>
|
||||
<% @searches.each do |search, count| %>
|
||||
<tr class="tag-type-<%= Tag.find_by_name(search)&.category.to_i %>">
|
||||
<td><%= link_to search, posts_path(tags: search) %></td>
|
||||
<td style="text-align: right;"><%= count.to_i %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
|
||||
Reference in New Issue
Block a user