Refactored code to reduce number of database queries (#960)

This commit is contained in:
Ahmad Farhat
2020-02-24 12:31:30 -05:00
committed by GitHub
parent 92da1f6f87
commit 2cc1fdf281
14 changed files with 81 additions and 52 deletions

View File

@ -55,7 +55,7 @@
<i class="dropdown-icon fas fa-users"></i> <%= t("room.share") %>
</a>
<% end %>
<% unless room == room.owner.main_room %>
<% unless room == current_user.main_room %>
<a href="" data-toggle="modal" data-target="#deleteRoomModal" data-path="<%= room_path(room) %>" data-name="<%= room.name %>" class="delete-room dropdown-item">
<i class="dropdown-icon far fa-trash-alt"></i> <%= t("delete") %>
</a>