diff options
author | Star Rauchenberger <fefferburbia@gmail.com> | 2023-10-21 17:23:03 -0400 |
---|---|---|
committer | Star Rauchenberger <fefferburbia@gmail.com> | 2023-10-21 17:23:03 -0400 |
commit | 41155441c9412ab0dba0b62f606cdef5488343f1 (patch) | |
tree | 97ed01ea1c946cbaab03d29577034f9dcde18192 /app/controllers | |
parent | 00c44f229e1f2cc55ed8212e0a5ef8c5f884487b (diff) | |
download | thoughts-41155441c9412ab0dba0b62f606cdef5488343f1.tar.gz thoughts-41155441c9412ab0dba0b62f606cdef5488343f1.tar.bz2 thoughts-41155441c9412ab0dba0b62f606cdef5488343f1.zip |
Reduce emails from quote submission
If I'm the submitter, it won't send the pending email. It still needs to be moderated though.
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/quotes_controller.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/app/controllers/quotes_controller.rb b/app/controllers/quotes_controller.rb index dd37cde..a0aa7cd 100644 --- a/app/controllers/quotes_controller.rb +++ b/app/controllers/quotes_controller.rb | |||
@@ -180,7 +180,10 @@ class QuotesController < ApplicationController | |||
180 | @quote.state = :pending | 180 | @quote.state = :pending |
181 | @quote.save! | 181 | @quote.save! |
182 | 182 | ||
183 | QuoteMailer.with(quote: @quote).pending_quote_email.deliver_later | 183 | # hacky little thing to reduce the number of emails I get |
184 | unless @quote.submitter == "hatkirby" | ||
185 | QuoteMailer.with(quote: @quote).pending_quote_email.deliver_later | ||
186 | end | ||
184 | 187 | ||
185 | flash[:notice] = "Your quote has been submitted and is pending moderation." | 188 | flash[:notice] = "Your quote has been submitted and is pending moderation." |
186 | respond_to do |format| | 189 | respond_to do |format| |