From 3b6260a2821e88f1f0911236167a4fd4b6effdd1 Mon Sep 17 00:00:00 2001 From: dquach217 Date: Fri, 16 Aug 2019 14:27:04 -0400 Subject: [PATCH 1/4] feat: alert if user is redirected when arriving to rsvp --- app/controllers/rsvps_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/rsvps_controller.rb b/app/controllers/rsvps_controller.rb index 578206a93..cf846ad56 100644 --- a/app/controllers/rsvps_controller.rb +++ b/app/controllers/rsvps_controller.rb @@ -106,7 +106,7 @@ def check_user_has_questionnaire def require_accepted_questionnaire return if @questionnaire.can_rsvp? || @questionnaire.checked_in? - + flash[:alert] = "You had not been accepted" redirect_to new_questionnaires_path end end From 6ec9e538180b3f9c0f107b13c9d914cb637d5fde Mon Sep 17 00:00:00 2001 From: dquach217 Date: Fri, 16 Aug 2019 14:39:56 -0400 Subject: [PATCH 2/4] add empty line after guard clause --- app/controllers/rsvps_controller.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/controllers/rsvps_controller.rb b/app/controllers/rsvps_controller.rb index cf846ad56..f5eefd236 100644 --- a/app/controllers/rsvps_controller.rb +++ b/app/controllers/rsvps_controller.rb @@ -106,6 +106,7 @@ def check_user_has_questionnaire def require_accepted_questionnaire return if @questionnaire.can_rsvp? || @questionnaire.checked_in? + flash[:alert] = "You had not been accepted" redirect_to new_questionnaires_path end From bd7a4be2731b955e7cdd8cad5171310ebb9100df Mon Sep 17 00:00:00 2001 From: dquach217 Date: Fri, 16 Aug 2019 14:41:50 -0400 Subject: [PATCH 3/4] remove trailing white spaces --- app/controllers/rsvps_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/rsvps_controller.rb b/app/controllers/rsvps_controller.rb index f5eefd236..c0ce1b5c9 100644 --- a/app/controllers/rsvps_controller.rb +++ b/app/controllers/rsvps_controller.rb @@ -106,7 +106,7 @@ def check_user_has_questionnaire def require_accepted_questionnaire return if @questionnaire.can_rsvp? || @questionnaire.checked_in? - + flash[:alert] = "You had not been accepted" redirect_to new_questionnaires_path end From d0ffca42e67313dfe2567e3b8bb70c6881e686df Mon Sep 17 00:00:00 2001 From: David Quach Date: Sat, 17 Aug 2019 22:08:13 -0400 Subject: [PATCH 4/4] Update app/controllers/rsvps_controller.rb Co-Authored-By: Stuart Olivera --- app/controllers/rsvps_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/rsvps_controller.rb b/app/controllers/rsvps_controller.rb index c0ce1b5c9..82d9f0e2d 100644 --- a/app/controllers/rsvps_controller.rb +++ b/app/controllers/rsvps_controller.rb @@ -107,7 +107,7 @@ def check_user_has_questionnaire def require_accepted_questionnaire return if @questionnaire.can_rsvp? || @questionnaire.checked_in? - flash[:alert] = "You had not been accepted" + flash[:alert] = "Sorry, you have not been accepted at this time. Please wait for an acceptance email before attempting to RSVP." redirect_to new_questionnaires_path end end