Skip to content
Snippets Groups Projects
Unverified Commit 7a2405aa authored by Ahmad Farhat's avatar Ahmad Farhat Committed by GitHub
Browse files

Fixed 500 caused by room search (#2366)

parent 78094318
Branches
Tags
No related merge requests found
......@@ -97,6 +97,8 @@ class User < ApplicationRecord
# Returns a list of rooms ordered by last session (with nil rooms last)
def ordered_rooms
return [] if main_room.nil?
[main_room] + rooms.where.not(id: main_room.id).order(Arel.sql("last_session IS NULL, last_session desc"))
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment