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

@ -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