From 6141395ecc0a3d174543cde23bf6cf8db261660a Mon Sep 17 00:00:00 2001 From: Mike Hall Date: Wed, 10 Sep 2014 14:06:50 -0500 Subject: [PATCH] Restore subject prefix --- app/mailers/abuse_mailer.rb | 2 ++ app/mailers/notifier_mailer.rb | 1 + app/mailers/protip_mailer.rb | 1 + app/mailers/subscription_mailer.rb | 1 + app/mailers/weekly_digest_mailer.rb | 2 +- 5 files changed, 6 insertions(+), 1 deletion(-) diff --git a/app/mailers/abuse_mailer.rb b/app/mailers/abuse_mailer.rb index 3440aa73..64400077 100644 --- a/app/mailers/abuse_mailer.rb +++ b/app/mailers/abuse_mailer.rb @@ -2,6 +2,8 @@ class AbuseMailer < ActionMailer::Base default_url_options[:host] = 'coderwall.com' default_url_options[:only_path] = false + ACTIVITY_SUBJECT_PREFIX = '[Coderwall]' + default to: -> { User.admins.pluck(:email) }, from: '"Coderwall" ' diff --git a/app/mailers/notifier_mailer.rb b/app/mailers/notifier_mailer.rb index 90724be7..2fddbcf4 100644 --- a/app/mailers/notifier_mailer.rb +++ b/app/mailers/notifier_mailer.rb @@ -25,6 +25,7 @@ class NothingToSendException < Exception NEW_COMMENT_EVENT = 'new_comment' NEW_APPLICANT_EVENT = 'new_applicant' INVOICE_EVENT = 'invoice' + ACTIVITY_SUBJECT_PREFIX = '[Coderwall]' def welcome_email(username) headers['X-Mailgun-Variables'] = {email_type: WELCOME_EVENT}.to_json diff --git a/app/mailers/protip_mailer.rb b/app/mailers/protip_mailer.rb index b6abf4fb..96fa10dc 100644 --- a/app/mailers/protip_mailer.rb +++ b/app/mailers/protip_mailer.rb @@ -17,6 +17,7 @@ class ProtipMailer < ActionMailer::Base protips_count: 'protips' } CAMPAIGN_ID = 'protip_mailer-popular_protips' + ACTIVITY_SUBJECT_PREFIX = '[Coderwall]' ################################################################################# def popular_protips(user, protips, from, to) diff --git a/app/mailers/subscription_mailer.rb b/app/mailers/subscription_mailer.rb index 9ecc0164..b359c1a5 100644 --- a/app/mailers/subscription_mailer.rb +++ b/app/mailers/subscription_mailer.rb @@ -12,6 +12,7 @@ class SubscriptionMailer < ActionMailer::Base MONTHLY_SUBSCRIPTION_PURCHASED_EVENT = 'monthly_subscription_purchased' ONETIME_SUBSCRIPTION_PURCHASED_EVENT = 'onetime_subscription_purchased' + ACTIVITY_SUBJECT_PREFIX = '[Coderwall]' def team_upgrade(username, plan_id) plan = Plan.find(plan_id) diff --git a/app/mailers/weekly_digest_mailer.rb b/app/mailers/weekly_digest_mailer.rb index 9fb5fc42..727304a9 100644 --- a/app/mailers/weekly_digest_mailer.rb +++ b/app/mailers/weekly_digest_mailer.rb @@ -19,7 +19,7 @@ def self.queue SPAM_NOTICE = "You're receiving this email because you signed up for Coderwall. We hate spam and make an effort to keep notifications to a minimum. To change your notification preferences, you can update your email settings here: http://coderwall.com/settings#email or immediately unsubscribe by clicking this link %unsubscribe_url%" WEEKLY_DIGEST_EVENT = 'weekly_digest' - ACTIVITY_SUBJECT_PREFIX = "[Coderwall]" + ACTIVITY_SUBJECT_PREFIX = '[Coderwall]' ################################################################################# def weekly_digest(username)