Fixed issues with rubocop (#916)

This commit is contained in:
Ahmad Farhat 2020-01-09 12:35:32 -05:00 committed by farhatahmad
parent 09de6b6739
commit c13a83a3f3
2 changed files with 2 additions and 6 deletions

View File

@ -39,9 +39,7 @@ class Ability
:approve, :invite, :reset, :undelete], :admin
end
if highest_role.get_permission("can_manage_rooms_recordings")
can [:index, :server_recordings, :server_rooms], :admin
end
can [:index, :server_recordings, :server_rooms], :admin if highest_role.get_permission("can_manage_rooms_recordings")
if !highest_role.get_permission("can_edit_site_settings") && !highest_role.get_permission("can_edit_roles") &&
!highest_role.get_permission("can_manage_users") && !highest_role.get_permission("can_manage_rooms_recordings")

View File

@ -48,9 +48,7 @@ class Room < ApplicationRecord
# Include the owner of the table
table = joins(:owner)
if table.column_names.include?(column) || column == "users.name"
return table.order(Arel.sql("#{column} #{direction}"))
end
return table.order(Arel.sql("#{column} #{direction}")) if table.column_names.include?(column) || column == "users.name"
table
end