@@ -21,7 +21,7 @@ def accept
21
21
flash [ :notice ] = "Thank you for confirming your attendance! You're all set to attend."
22
22
flash [ :notice ] += " See below for additional bus information." if BusList . any?
23
23
else
24
- flash [ :error ] = rsvp_error_notice
24
+ flash [ :alert ] = rsvp_error_notice
25
25
end
26
26
redirect_to rsvp_path
27
27
end
@@ -34,7 +34,7 @@ def deny
34
34
if @questionnaire . save
35
35
flash [ :notice ] = "Your RSVP has been updated."
36
36
else
37
- flash [ :error ] = rsvp_error_notice
37
+ flash [ :alert ] = rsvp_error_notice
38
38
end
39
39
redirect_to rsvp_path
40
40
end
@@ -44,13 +44,13 @@ def deny
44
44
# rubocop:disable PerceivedComplexity
45
45
def update
46
46
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 ( ", " )
48
48
redirect_to rsvp_path
49
49
return
50
50
end
51
51
52
52
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."
54
54
redirect_to rsvp_path
55
55
return
56
56
end
@@ -64,22 +64,22 @@ def update
64
64
is_joining_bus = new_bus_list . present? && @questionnaire . bus_list != new_bus_list
65
65
if is_joining_bus && new_bus_list . full?
66
66
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."
68
68
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."
70
70
end
71
71
else
72
72
@questionnaire . bus_list = new_bus_list
73
73
@questionnaire . bus_captain_interest = params [ :questionnaire ] [ :bus_captain_interest ]
74
74
end
75
75
76
76
unless @questionnaire . save
77
- flash [ :error ] = @questionnaire . errors . full_message . join ( ", " )
77
+ flash [ :alert ] = @questionnaire . errors . full_message . join ( ", " )
78
78
redirect_to rsvp_path
79
79
return
80
80
end
81
81
82
- if flash [ :notice ] . blank? && flash [ :error ] . blank?
82
+ if flash [ :notice ] . blank? && flash [ :alert ] . blank?
83
83
flash [ :notice ] = "Your RSVP has been updated."
84
84
flash [ :notice ] += " See below for additional bus information!" if @questionnaire . bus_list_id?
85
85
end
0 commit comments