FEATURE: added UI for tracking categories

This commit is contained in:
Sam
2014-01-06 11:57:17 +11:00
parent 3a2ae0061b
commit f91163e146
5 changed files with 25 additions and 2 deletions

View File

@ -62,6 +62,7 @@ class UserSerializer < BasicUserSerializer
:gravatar_template,
:uploaded_avatar_template,
:muted_category_ids,
:tracked_category_ids,
:watched_category_ids
@ -112,6 +113,10 @@ class UserSerializer < BasicUserSerializer
CategoryUser.lookup(object, :muted).pluck(:category_id)
end
def tracked_category_ids
CategoryUser.lookup(object, :tracking).pluck(:category_id)
end
def watched_category_ids
CategoryUser.lookup(object, :watching).pluck(:category_id)
end