mirror of
https://github.com/discourse/discourse.git
synced 2024-11-26 00:23:40 +08:00
988a175e94
This commit is a subset of the changes proposed in https://github.com/discourse/discourse/pull/17379.
14 lines
247 B
Ruby
14 lines
247 B
Ruby
# frozen_string_literal: true
|
|
|
|
class BasicReviewableSerializer < ApplicationSerializer
|
|
attributes :flagger_username, :id, :type, :pending
|
|
|
|
def flagger_username
|
|
object.created_by&.username
|
|
end
|
|
|
|
def pending
|
|
object.pending?
|
|
end
|
|
end
|