forked from External/greenlight
adhere to rubocop guidelines
This commit is contained in:
@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
module ApplicationHelper
|
||||
include MeetingsHelper
|
||||
|
||||
@ -12,7 +14,7 @@ module ApplicationHelper
|
||||
def omniauth_login_url(provider)
|
||||
"#{Rails.configuration.relative_url_root}/auth/#{provider}"
|
||||
end
|
||||
|
||||
|
||||
# Determine if Greenlight is configured to allow user signups.
|
||||
def allow_user_signup?
|
||||
Rails.configuration.allow_user_signup
|
||||
|
@ -1,2 +1,4 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
module ErrorsHelper
|
||||
end
|
||||
|
@ -1,2 +1,4 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
module MainHelper
|
||||
end
|
||||
|
@ -1,2 +1,4 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
module MeetingsHelper
|
||||
end
|
||||
|
@ -1,2 +1,4 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
module RoomsHelper
|
||||
end
|
||||
|
@ -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
|
||||
|
@ -1,2 +1,4 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
module UsersHelper
|
||||
end
|
||||
|
Reference in New Issue
Block a user