minor fixes

This commit is contained in:
Josh
2018-06-13 13:27:29 -04:00
parent bc9c2c1232
commit 83642f22c1
8 changed files with 29 additions and 26 deletions

View File

@ -77,13 +77,12 @@ class User < ApplicationRecord
end
end
def subtitle
case provider
when "greenlight", "google", "twitter"
"User"
else
"Unknown"
end
# Retrives a list of all a users rooms that are not the main room, sorted by last session date.
def secondary_rooms
secondary = (rooms - [main_room])
no_session, session = secondary.partition do |r| r.last_session.nil? end
sorted = session.sort_by do |r| r.last_session end
session + no_session
end
def firstname