This commit is contained in:
albert
2013-03-06 18:36:55 -05:00
parent e098863864
commit 09fb5da041

View File

@@ -84,8 +84,8 @@ class Tag < ActiveRecord::Base
Danbooru.config.reverse_tag_category_mapping[category] Danbooru.config.reverse_tag_category_mapping[category]
end end
def update_category_cache_for_all def update_category_cache_for_all(force = false)
if category_changed? if category_changed? || force
update_category_cache update_category_cache
Danbooru.config.other_server_hosts.each do |host| Danbooru.config.other_server_hosts.each do |host|
@@ -127,7 +127,7 @@ class Tag < ActiveRecord::Base
if category_id != tag.category if category_id != tag.category
tag.update_column(:category, category_id) tag.update_column(:category, category_id)
tag.update_category_cache_for_all tag.update_category_cache_for_all(true)
end end
end end