[feat]Implement FullCalendar#rooms_to_resources and add tests
This commit is contained in:
parent
54d7c31cac
commit
e1918fbf7e
4 changed files with 59 additions and 29 deletions
|
|
@ -1,3 +1,16 @@
|
|||
class FullCalendarFormatter
|
||||
def rooms_to_resources(rooms); end
|
||||
def self.rooms_to_resources(rooms)
|
||||
rooms.map { |room| room_to_resource(room) }.to_json
|
||||
end
|
||||
|
||||
def self.event_schedules_to_resources(event_schedules); end
|
||||
|
||||
private_class_method
|
||||
|
||||
def self.room_to_resource(room)
|
||||
{
|
||||
id: room.guid,
|
||||
title: room.name
|
||||
}
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue