From 03cdbd6b69047db3d88228971077facff50a9041 Mon Sep 17 00:00:00 2001 From: Ahmad Farhat Date: Fri, 20 Mar 2020 11:18:05 -0400 Subject: [PATCH] Fixed bugs in administrator panel (#1047) --- app/models/room.rb | 4 +++- app/views/admins/components/_server_room_row.html.erb | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/app/models/room.rb b/app/models/room.rb index 158fdc23..82650001 100644 --- a/app/models/room.rb +++ b/app/models/room.rb @@ -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 diff --git a/app/views/admins/components/_server_room_row.html.erb b/app/views/admins/components/_server_room_row.html.erb index 26e4892e..d41fe740 100644 --- a/app/views/admins/components/_server_room_row.html.erb +++ b/app/views/admins/components/_server_room_row.html.erb @@ -53,7 +53,7 @@ <%= button_to start_room_path(room), class: "dropdown-item", "data-disable": "" do %> <%= running ? t("room.join") : t("room.start") %> <% end %> - + <%= t("room.settings") %> <% if shared_access_allowed %>