From 6b69d717cc2f1baa4232a5568175fb9305d6efd0 Mon Sep 17 00:00:00 2001 From: Faisal Abbas <90.abbasfaisal@gmail.com> Date: Sun, 13 Dec 2015 15:26:16 +0500 Subject: [PATCH] FIX: On clicking edit category button, notification level is set to default commit message --- app/serializers/basic_category_serializer.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/serializers/basic_category_serializer.rb b/app/serializers/basic_category_serializer.rb index cf78bdfd865..2bf18d85612 100644 --- a/app/serializers/basic_category_serializer.rb +++ b/app/serializers/basic_category_serializer.rb @@ -38,4 +38,7 @@ class BasicCategorySerializer < ApplicationSerializer scope && scope.can_edit?(object) end + def notification_level + object.notification_level || CategoryUser.where(user: object.user, category: object).first.try(:notification_level) + end end