@@ -21,7 +21,7 @@ def accept
2121 flash [ :notice ] = "Thank you for confirming your attendance! You're all set to attend."
2222 flash [ :notice ] += " See below for additional bus information." if BusList . any?
2323 else
24- flash [ :error ] = rsvp_error_notice
24+ flash [ :alert ] = rsvp_error_notice
2525 end
2626 redirect_to rsvp_path
2727 end
@@ -34,7 +34,7 @@ def deny
3434 if @questionnaire . save
3535 flash [ :notice ] = "Your RSVP has been updated."
3636 else
37- flash [ :error ] = rsvp_error_notice
37+ flash [ :alert ] = rsvp_error_notice
3838 end
3939 redirect_to rsvp_path
4040 end
@@ -44,13 +44,13 @@ def deny
4444 # rubocop:disable PerceivedComplexity
4545 def update
4646 unless @questionnaire . update_attributes ( params . require ( :questionnaire ) . permit ( :agreement_accepted , :phone ) )
47- flash [ :error ] = @questionnaire . errors . full_messages . join ( ", " )
47+ flash [ :alert ] = @questionnaire . errors . full_messages . join ( ", " )
4848 redirect_to rsvp_path
4949 return
5050 end
5151
5252 unless [ "rsvp_confirmed" , "rsvp_denied" ] . include? params [ :questionnaire ] [ :acc_status ]
53- flash [ :error ] = "Please select a RSVP status."
53+ flash [ :alert ] = "Please select a RSVP status."
5454 redirect_to rsvp_path
5555 return
5656 end
@@ -64,22 +64,22 @@ def update
6464 is_joining_bus = new_bus_list . present? && @questionnaire . bus_list != new_bus_list
6565 if is_joining_bus && new_bus_list . full?
6666 if @questionnaire . bus_list_id?
67- flash [ :error ] = "Sorry, that bus is full. You are still signed up for the '#{ @questionnaire . bus_list . name } ' bus."
67+ flash [ :alert ] = "Sorry, that bus is full. You are still signed up for the '#{ @questionnaire . bus_list . name } ' bus."
6868 else
69- flash [ :error ] = "Sorry, that bus is full. You may need to arrange other plans for transportation."
69+ flash [ :alert ] = "Sorry, that bus is full. You may need to arrange other plans for transportation."
7070 end
7171 else
7272 @questionnaire . bus_list = new_bus_list
7373 @questionnaire . bus_captain_interest = params [ :questionnaire ] [ :bus_captain_interest ]
7474 end
7575
7676 unless @questionnaire . save
77- flash [ :error ] = @questionnaire . errors . full_message . join ( ", " )
77+ flash [ :alert ] = @questionnaire . errors . full_message . join ( ", " )
7878 redirect_to rsvp_path
7979 return
8080 end
8181
82- if flash [ :notice ] . blank? && flash [ :error ] . blank?
82+ if flash [ :notice ] . blank? && flash [ :alert ] . blank?
8383 flash [ :notice ] = "Your RSVP has been updated."
8484 flash [ :notice ] += " See below for additional bus information!" if @questionnaire . bus_list_id?
8585 end
0 commit comments