openSUSE/osem

View on GitHub
app/serializers/event_schedule_serializer.rb

Summary

Maintainability
A
0 mins
Test Coverage
# frozen_string_literal: true

class EventScheduleSerializer < ActiveModel::Serializer
  include ActionView::Helpers::TextHelper

  attributes :date, :room

  def date
    object.start_time&.change(zone: object.event.program.conference.timezone)
  end

  def room
    object.room.guid
  end
end