Fixed bugs in administrator panel (#1047)

This commit is contained in:
Ahmad Farhat 2020-03-20 11:18:05 -04:00 committed by GitHub
parent 4cc45ab017
commit 03cdbd6b69
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View File

@ -49,7 +49,9 @@ class Room < ApplicationRecord
# Include the owner of the table # Include the owner of the table
table = joins(:owner) 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 table
end end

View File

@ -53,7 +53,7 @@
<%= button_to start_room_path(room), class: "dropdown-item", "data-disable": "" do %> <%= button_to start_room_path(room), class: "dropdown-item", "data-disable": "" do %>
<i class="dropdown-icon fas fa-door-open"></i> <%= running ? t("room.join") : t("room.start") %> <i class="dropdown-icon fas fa-door-open"></i> <%= running ? t("room.join") : t("room.start") %>
<% end %> <% end %>
<a href="" data-toggle="modal" data-target="#createRoomModal" class="update-room dropdown-item"> <a href="" data-toggle="modal" data-target="#createRoomModal" class="update-room dropdown-item" data-settings-path="<%= room_settings_path(room) %>">
<i class="dropdown-icon fas fa-cog"></i> <%= t("room.settings") %> <i class="dropdown-icon fas fa-cog"></i> <%= t("room.settings") %>
</a> </a>
<% if shared_access_allowed %> <% if shared_access_allowed %>