mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
For the schedule versioning in the admin interface (having multiple possible shcedules) we need to change some models and associations. It has also been create a rake:move_events_attributes task to migrate the data. User Interface addapted to make use of the introduced associations and models
14 lines
299 B
Ruby
14 lines
299 B
Ruby
class EventScheduleSerializer < ActiveModel::Serializer
|
|
include ActionView::Helpers::TextHelper
|
|
|
|
attributes :date, :room
|
|
|
|
def date
|
|
t = object.start_time
|
|
t.blank? ? '' : %( #{I18n.l t, format: :short}#{t.formatted_offset(false)} )
|
|
end
|
|
|
|
def room
|
|
object.room.try(:guid)
|
|
end
|
|
end
|