mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
Render category descriptions differently on the categories page
This commit is contained in:
@@ -10,6 +10,7 @@ class CategoryDetailedSerializer < ApplicationSerializer
|
||||
:topics_month,
|
||||
:topics_year,
|
||||
:description,
|
||||
:description_excerpt,
|
||||
:is_uncategorized
|
||||
|
||||
has_many :featured_users, serializer: BasicUserSerializer
|
||||
@@ -39,4 +40,8 @@ class CategoryDetailedSerializer < ApplicationSerializer
|
||||
return displayable_topics.present?
|
||||
end
|
||||
|
||||
def description_excerpt
|
||||
PrettyText.excerpt(description,300) if description
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user