From b828a9d6c6ed0fdb2776278637915402b0e7beb9 Mon Sep 17 00:00:00 2001 From: Brian Date: Fri, 20 Dec 2019 08:26:22 -0500 Subject: [PATCH 1/2] fixes redirect loop Redirecting users to `/account/sign_in` caused a redirect loop which crashed the page, but still adds them to the `users` table correctly.. Forcing users to the `root_path` solves the redirect loop. --- app/controllers/users/omniauth_callbacks_controller.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/controllers/users/omniauth_callbacks_controller.rb b/app/controllers/users/omniauth_callbacks_controller.rb index 8d0f80dd..3cc3c621 100644 --- a/app/controllers/users/omniauth_callbacks_controller.rb +++ b/app/controllers/users/omniauth_callbacks_controller.rb @@ -35,8 +35,7 @@ module Users openid.save! sign_in user - redirect_to request.env['omniauth.origin'] || root_path, - notice: "#{user.email} signed in successfully with #{provider}" + redirect_to root_path, notice: "#{user.email} signed in successfully with #{provider}" rescue => e flash[:error] = e.message redirect_back_or_to new_user_registration_path From 2d31ababaaf78e84a230ddfb99228c66c45d7057 Mon Sep 17 00:00:00 2001 From: Brian Date: Fri, 20 Dec 2019 10:38:14 -0500 Subject: [PATCH 2/2] Correct variable error Line 30 was missing the `@` in `@event.speakers.any`, which caused a 500 error when clicking on a session in the program. Corrected the typo. --- app/views/proposals/show.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/proposals/show.html.haml b/app/views/proposals/show.html.haml index f328c9a2..a7a155bb 100644 --- a/app/views/proposals/show.html.haml +++ b/app/views/proposals/show.html.haml @@ -27,7 +27,7 @@ .row .col-md-3 %h3 - - if event.speakers.any? + - if @event.speakers.any? Presented by: - @speakers_ordered.each do |speaker| .speakerinfo