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

@ -57,7 +57,6 @@ module ApplicationHelper
# Returns the page that the logo redirects to when clicked on
def home_page
return root_path unless current_user
return admins_path if current_user.has_role? :super_admin
current_user.main_room
end