app/controllers/rsvps_controller.rb in hackathon_manager-0.7.1 vs app/controllers/rsvps_controller.rb in hackathon_manager-0.8.0
- old
+ new
@@ -20,11 +20,10 @@
@questionnaire.acc_status_author_id = current_user.id
@questionnaire.acc_status_date = Time.now
if @questionnaire.save
flash[:notice] = "Thank you for confirming your attendance! "
flash[:notice] += @questionnaire.eligible_for_a_bus? ? "See below for additional bus information." : "You're all set to attend."
- Mailer.delay.rsvp_confirmation_email(@questionnaire.id)
else
flash[:notice] = rsvp_error_notice
end
redirect_to rsvp_path
end
@@ -70,18 +69,14 @@
else
@questionnaire.riding_bus = params[:questionnaire][:riding_bus]
@questionnaire.bus_captain_interest = params[:questionnaire][:bus_captain_interest]
end
- acc_status_changed = @questionnaire.acc_status_changed?
-
unless @questionnaire.save
flash[:notice] = @questionnaire.errors.full_message.join(", ")
redirect_to rsvp_path
return
end
-
- Mailer.delay.rsvp_confirmation_email(@questionnaire.id) if acc_status_changed && @questionnaire.acc_status == "rsvp_confirmed"
flash[:notice] = "Your RSVP has been updated." if flash[:notice].blank?
redirect_to rsvp_path
end