tags: update category cache whenever category changes.

Do `update_category_cache_for_all` in a callback instead of calling it
manually everywhere.
This commit is contained in:
evazion
2017-12-23 13:07:23 -06:00
parent 806513836b
commit 19bda2056c
5 changed files with 3 additions and 7 deletions

View File

@@ -117,7 +117,6 @@ private
tag = Tag.find_by_name(token[1])
tag.category = Tag.categories.value_for(token[2])
tag.save
tag.update_category_cache_for_all
else
raise "Unknown token: #{token[0]}"