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

@@ -36,7 +36,6 @@ class TagsController < ApplicationController
@tag = Tag.find(params[:id])
check_privilege(@tag)
@tag.update_attributes(params[:tag], :as => CurrentUser.role)
@tag.update_category_cache_for_all
respond_with(@tag)
end