adhere to rubocop guidelines

This commit is contained in:
Josh
2018-06-26 10:29:46 -04:00
parent d2a677d15f
commit ad5f218f23
64 changed files with 305 additions and 212 deletions

View File

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

View File

@ -1,2 +1,4 @@
# frozen_string_literal: true
module ErrorsHelper
end

View File

@ -1,2 +1,4 @@
# frozen_string_literal: true
module MainHelper
end

View File

@ -1,2 +1,4 @@
# frozen_string_literal: true
module MeetingsHelper
end

View File

@ -1,2 +1,4 @@
# frozen_string_literal: true
module RoomsHelper
end

View File

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

View File

@ -1,2 +1,4 @@
# frozen_string_literal: true
module UsersHelper
end