Class: CategoryListSerializer

Inherits:
ApplicationSerializer show all
Defined in:
app/serializers/category_list_serializer.rb

Instance Method Summary collapse

Methods inherited from ApplicationSerializer

expire_cache_fragment!, fragment_cache

Methods inherited from ActiveModel::Serializer

#include!

Instance Method Details

#can_create_categoryObject



8
9
10
# File 'app/serializers/category_list_serializer.rb', line 8

def can_create_category
  scope.can_create?(Category)
end

#can_create_topicObject



12
13
14
# File 'app/serializers/category_list_serializer.rb', line 12

def can_create_topic
  scope.can_create?(Topic)
end