I wish this was more readable.  It seems like this drops down into a pretty low level implementation detail which (not necessarily knowing the raw data structure) made me have to dig to understand exactly what this did.  Should/Can we hide this down in a private method and name it something like:
<code>load_all_rooms</code> or <code>register_rooms_by_id</code>.  There might be better names than these.