app/serializers/landable/template_serializer.rb in landable-1.13.2 vs app/serializers/landable/template_serializer.rb in landable-1.14.0
- old
+ new
@@ -10,7 +10,12 @@
embed :ids
has_one :published_revision
has_many :pages
+ has_one :category
+
+ def category
+ object.category || Landable::Category.where(name: 'Uncategorized').first
+ end
end
end