discourse/app/serializers/reviewable_bundled_action_serializer.rb
Robin Ward b58867b6e9 FEATURE: New 'Reviewable' model to make reviewable items generic
Includes support for flags, reviewable users and queued posts, with REST API
backwards compatibility.

Co-Authored-By: romanrizzi <romanalejandro@gmail.com>
Co-Authored-By: jjaffeux <j.jaffeux@gmail.com>
2019-03-28 12:45:10 -04:00

9 lines
221 B
Ruby

class ReviewableBundledActionSerializer < ApplicationSerializer
attributes :id, :icon, :label
has_many :actions, serializer: ReviewableActionSerializer, root: 'actions'
def label
I18n.t(object.label)
end
end