fix Post#set_tag_counts
This commit is contained in:
@@ -103,8 +103,9 @@ class Tag < ActiveRecord::Base
|
|||||||
|
|
||||||
def categories_for(tag_names, options = {})
|
def categories_for(tag_names, options = {})
|
||||||
if options[:disable_caching]
|
if options[:disable_caching]
|
||||||
Array(tag_names).map do |tag|
|
Array(tag_names).inject({}) do |hash, tag_name|
|
||||||
select_category_for(tag)
|
hash[tag_name] = select_category_for(tag_name)
|
||||||
|
hash
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
Cache.get_multi(Array(tag_names), "tc") do |tag|
|
Cache.get_multi(Array(tag_names), "tc") do |tag|
|
||||||
|
|||||||
Reference in New Issue
Block a user