This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Load all rooms. | |
# | |
# Returns an array of hashes describing each room. | |
def all | |
devices = Device.all | |
rooms = [] | |
# Go through each device, check wich room it belongs | |
# do, if the room does not exist, add it to rooms, if | |
# just add this device to the list of devices |