forked from External/greenlight
adhere to rubocop guidelines
This commit is contained in:
@ -1,11 +1,12 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
module SessionsHelper
|
||||
|
||||
# Logs a user into GreenLight.
|
||||
def login(user)
|
||||
session[:user_id] = user.id
|
||||
|
||||
# If there are not terms, or the user has accepted them, go to their room.
|
||||
if !Rails.configuration.terms || user.accepted_terms then
|
||||
if !Rails.configuration.terms || user.accepted_terms
|
||||
redirect_to user.main_room
|
||||
else
|
||||
redirect_to terms_path
|
||||
|
Reference in New Issue
Block a user