forked from External/greenlight
GRN2-277: Optimize server recordings to make it useable for large deployments (#2411)
* First changes to server recordings * Update server recordings * Rubocop * Make sure to return nothing for empty searches * Made sure exactly the right amount of recordings are returned * Added test cases
This commit is contained in:
@ -51,7 +51,7 @@ class Room < ApplicationRecord
|
||||
# Rely on manual ordering if trying to sort by status
|
||||
return order_by_status(table, running_ids) if column == "status"
|
||||
|
||||
return table.order("COALESCE(rooms.last_session,rooms.created_at) DESC") if column == "created_at"
|
||||
return table.order(Arel.sql("COALESCE(rooms.last_session,rooms.created_at) DESC")) if column == "created_at"
|
||||
|
||||
return table.order(Arel.sql("rooms.#{column} #{direction}")) if table.column_names.include?(column)
|
||||
|
||||
|
Reference in New Issue
Block a user