diff options
author | Jacopo <beschi.jacopo@gmail.com> | 2017-12-22 00:15:50 +0300 |
---|---|---|
committer | Jacopo <beschi.jacopo@gmail.com> | 2017-12-24 14:14:17 +0300 |
commit | 6185ce0c84b5674abf4f54576fec44fece571565 (patch) | |
tree | 2c2a3bf90a4beb10628477bc22b37c9c7d056202 /app/serializers/group_child_entity.rb | |
parent | 2972352a9c6912adfd77b480472eb13b832a6c3b (diff) |
Rendering of emoji's in Group-Overview
Allows rendering of emoji's in the Group Overview.
Diffstat (limited to 'app/serializers/group_child_entity.rb')
-rw-r--r-- | app/serializers/group_child_entity.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/app/serializers/group_child_entity.rb b/app/serializers/group_child_entity.rb index 37240bfb0b1..aca4e4ca488 100644 --- a/app/serializers/group_child_entity.rb +++ b/app/serializers/group_child_entity.rb @@ -1,6 +1,7 @@ class GroupChildEntity < Grape::Entity include ActionView::Helpers::NumberHelper include RequestAwareEntity + include MarkupHelper expose :id, :name, :description, :visibility, :full_name, :created_at, :updated_at, :avatar_url @@ -59,6 +60,10 @@ class GroupChildEntity < Grape::Entity number_with_delimiter(instance.member_count) end + expose :markdown_description do |instance| + markdown_description + end + private def membership @@ -74,4 +79,8 @@ class GroupChildEntity < Grape::Entity def type object.class.name.downcase end + + def markdown_description + markdown_field(object, :description) + end end |