forked from External/greenlight
Fixed bugs in administrator panel (#1047)
This commit is contained in:
@ -49,7 +49,9 @@ class Room < ApplicationRecord
|
||||
# Include the owner of the table
|
||||
table = joins(:owner)
|
||||
|
||||
return table.order(Arel.sql("rooms.#{column} #{direction}")) if table.column_names.include?(column) || column == "users.name"
|
||||
return table.order(Arel.sql("rooms.#{column} #{direction}")) if table.column_names.include?(column)
|
||||
|
||||
return table.order(Arel.sql("#{column} #{direction}")) if column == "users.name"
|
||||
|
||||
table
|
||||
end
|
||||
|
Reference in New Issue
Block a user