class TeachingPeriodSerializer < ActiveModel::Serializer
  attributes :id, :period, :year

  def period
    object.period
  end

  def year
    object.year
  end
end

class TeachingPeriodSerializer < ActiveModel::Serializer
  attributes :id, :period, :year, :start_date, :end_date
end

Remove the redundant functions from teaching period serializer
ENHANCE: Remove the redundant functions from teaching period serializer
