add column name in serializer in object
module BxBlockApprover
class ApproverSerializer < BuilderBase::BaseSerializer
include FastJsonapi::ObjectSerializer
attributes *[
:id,
:no_of_approvers,
:approver_account_ids,
:description,
:notify,
:role_id,
:account_id
]
attribute :role do |object|
object&.role&.name
end
end
end
Comments
Post a Comment