Class: DetailedTagSerializer
Instance Method Summary
collapse
#staff, #topic_count
expire_cache_fragment!, fragment_cache
#include!
Instance Method Details
#categories ⇒ Object
12
13
14
|
# File 'app/serializers/detailed_tag_serializer.rb', line 12
def categories
object.all_categories(scope)
end
|
#category_restricted ⇒ Object
16
17
18
|
# File 'app/serializers/detailed_tag_serializer.rb', line 16
def category_restricted
object.all_category_ids.present?
end
|
#include_tag_group_names? ⇒ Boolean
20
21
22
|
# File 'app/serializers/detailed_tag_serializer.rb', line 20
def include_tag_group_names?
scope.is_admin? || SiteSetting.tags_listed_by_group == true
end
|
#synonyms ⇒ Object
8
9
10
|
# File 'app/serializers/detailed_tag_serializer.rb', line 8
def synonyms
TagsController.tag_counts_json(object.synonyms, scope)
end
|
#tag_group_names ⇒ Object
24
25
26
|
# File 'app/serializers/detailed_tag_serializer.rb', line 24
def tag_group_names
object.tag_groups.map(&:name)
end
|