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:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user