Fix #3365: Incorrect tag category counts.

`Hash[array]` didn't work because Hash needed to be called as `Hash[*array]`. Or,
more simply, `array.to_h`.
This commit is contained in:
evazion
2017-11-13 21:45:12 -06:00
parent 6d8143a9eb
commit 5f39a8b4b2
2 changed files with 2 additions and 2 deletions

View File

@@ -626,7 +626,7 @@ class Post < ApplicationRecord
def set_tag_counts
self.tag_count = 0
TagCategory.categories {|x| set_tag_count(x,0)}
TagCategory.categories.each {|x| set_tag_count(x,0)}
categories = Tag.categories_for(tag_array, :disable_caching => true)
categories.each_value do |category|
self.tag_count += 1