fix for emails

This commit is contained in:
Harry Bomrah 2016-01-12 11:53:34 +08:00
parent 87e8ab8f05
commit ada3d99396
1 changed files with 15 additions and 15 deletions

View File

@ -65,14 +65,14 @@ class Admin::NewsController < OrbitAdminController
news_bulletin.save news_bulletin.save
else else
news_bulletin.save news_bulletin.save
Thread.new do # Thread.new do
begin # begin
send_notification_mail_to_managers(news_bulletin,"approval") # send_notification_mail_to_managers(news_bulletin,"approval")
rescue e # rescue e
# end
# end
end end
end # build_email(news_bulletin)
end
build_email(news_bulletin)
redirect_to params['referer_url'] redirect_to params['referer_url']
end end
@ -89,7 +89,7 @@ class Admin::NewsController < OrbitAdminController
news_bulletin.reapproval = false news_bulletin.reapproval = false
news_bulletin.rejection_reason = params["reason"] news_bulletin.rejection_reason = params["reason"]
news_bulletin.save news_bulletin.save
send_rejection_email(news_bulletin) # send_rejection_email(news_bulletin)
end end
redirect_to "/admin/news" redirect_to "/admin/news"
end end
@ -125,15 +125,15 @@ class Admin::NewsController < OrbitAdminController
if news_bulletin.rejected if news_bulletin.rejected
news_bulletin.reapproval = true news_bulletin.reapproval = true
news_bulletin.save news_bulletin.save
Thread.new do # Thread.new do
begin # begin
send_notification_mail_to_managers(news_bulletin, "reapproval") # send_notification_mail_to_managers(news_bulletin, "reapproval")
rescue e # rescue e
end # end
end # end
end end
news_bulletin.save news_bulletin.save
build_email(news_bulletin) # build_email(news_bulletin)
redirect_to params['referer_url'] redirect_to params['referer_url']
end end