education/classroom

View on GitHub
app/serializers/group_assignment_serializer.rb

Summary

Maintainability
A
0 mins
Test Coverage
# frozen_string_literal: true

class GroupAssignmentSerializer < ActiveModel::Serializer
  attributes :id
  attributes :title
  attributes :type
  attributes :organizationGithubId

  def type
    :group
  end

  # rubocop:disable MethodName
  def organizationGithubId
    object.organization.github_id
  end
  # rubocop:enable MethodName
end