From c1941ff35ea2cb9a17422b03020e3118a448288d Mon Sep 17 00:00:00 2001 From: Rahul Date: Fri, 23 Aug 2019 17:38:17 +0530 Subject: [PATCH] add if condition to send booth rejection mail --- app/controllers/admin/booths_controller.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/controllers/admin/booths_controller.rb b/app/controllers/admin/booths_controller.rb index 1b9169c8..b33ec103 100644 --- a/app/controllers/admin/booths_controller.rb +++ b/app/controllers/admin/booths_controller.rb @@ -92,7 +92,9 @@ module Admin @booth.reject! if @booth.save - Mailbot.conference_booths_rejection_mail(@booth).deliver_later + if @conference.email_settings.send_on_booths_rejection + Mailbot.conference_booths_rejection_mail(@booth).deliver_later + end redirect_to admin_conference_booths_path(conference_id: @conference.short_title), notice: "#{(t'booth').capitalize} successfully rejected." else