From 3f67f91d277fd9fd84ce35d92ad0281d34ca8c70 Mon Sep 17 00:00:00 2001 From: Sam Saffron Date: Thu, 4 Feb 2016 00:19:08 +1100 Subject: [PATCH] need to allow for now scope --- app/serializers/category_serializer.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/serializers/category_serializer.rb b/app/serializers/category_serializer.rb index 3197be082..74947fde9 100644 --- a/app/serializers/category_serializer.rb +++ b/app/serializers/category_serializer.rb @@ -72,7 +72,7 @@ class CategorySerializer < BasicCategorySerializer end def notification_level - user = scope.user + user = scope && scope.user object.notification_level || (user && CategoryUser.where(user: user, category: object).first.try(:notification_level)) end