We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f40922b commit 6a14470Copy full SHA for 6a14470
app/mailers/mail_preview.rb
@@ -0,0 +1,11 @@
1
+class MailPreview < MailView
2
+ def welcome_email
3
+ user = User.find_or_create_by_username('testusername') do |u|
4
+ u.email = 'test@example.com'
5
+ u.location = 'Chicago, IL'
6
+ end
7
+ mail = Notifier.welcome_email(user.username)
8
+ user.destroy
9
+ mail
10
11
+end
app/mailers/notifier.rb
@@ -34,7 +34,6 @@ def welcome_email(username)
34
@user = User.with_username(username)
35
@user.touch(:last_email_sent)
36
37
-
38
if @user.created_at < 2.days.ago
39
track_campaign('welcome_delayed')
40
else
0 commit comments