I'm not quite sure why this isn't working but I have the following serializer:
class ExternalAccountSerializer < ActiveModel::Serializer
attributes :id, :account_name, :type
belongs_to :user, serializer: UserSerializer
end
The API is returning the following:
{
"external_account":{
"id":3,"account_name":"Company Inc.","type":"External service"
}
}
The external account is being returned but the user is not. Any ideas why that is? How can I ensure this is displayed?