BUGFIX: Editing a category would break categories for the current user

session.
This commit is contained in:
Robin Ward 2014-03-05 17:21:55 -05:00
parent ca12ea42a7
commit 2b0151afe9
1 changed files with 3 additions and 0 deletions

View File

@ -41,6 +41,9 @@ class CategoriesController < ApplicationController
end
def show
if Category.topic_create_allowed(guardian).where(id: @category.id).exists?
@category.permission = CategoryGroup.permission_types[:full]
end
render_serialized(@category, CategorySerializer)
end