Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Previews when mail wasn't called (NullMail instances). #19917

Merged
merged 2 commits into from Apr 28, 2015

Conversation

senny
Copy link
Member

@senny senny commented Apr 27, 2015

Closes #19849

This patch makes it possible to preview NullMail instances. It reuses the same template to keep a consistent output but replaces the body iframe with help and debug output:

screen shot 2015-04-27 at 10 15 31

It was also necessary to get the definition list to align properly when blank values are involved:

Before:
screen shot 2015-04-27 at 09 36 51

After:
screen shot 2015-04-27 at 09 37 04

@senny
Copy link
Member Author

senny commented Apr 27, 2015

I opened a PR as I'm not sure about the wording:

You are trying to preview an email without content.

I didn't want to use the term NullMail for user facing messages but the above is not accurate.

Secondly, I'm not sure the debug output is worth it. It might very well be more confusing than helpful.

@pixeltrix @rafaelfranca thoughts?

@rafaelfranca
Copy link
Member

Maybe:

You are trying to preview an email message that was not built.

?

And I think we can remove the debug output.

@prathamesh-sonpatki
Copy link
Member

Maybe:

You are trying to preview this email without calling mail method in your mailer.

As NullMail instance gets created if @_mail_was_called is not called?

@pixeltrix
Copy link
Contributor

@senny as @rafaelfranca said just remove the debug output and :shipit:

While this was true before when every `dd` had a value,
this patch makes sure that everything keeps lining up even
when the `dd` node is blank.
senny added a commit that referenced this pull request Apr 28, 2015
Previews when `mail` wasn't called (NullMail instances).
@senny senny merged commit 9e84c00 into rails:master Apr 28, 2015
@senny senny deleted the preview_null_mail branch April 28, 2015 14:24
senny added a commit that referenced this pull request Apr 28, 2015
Previews when `mail` wasn't called (NullMail instances).
Conflicts:
	actionmailer/CHANGELOG.md
senny added a commit that referenced this pull request Apr 28, 2015
Previews when `mail` wasn't called (NullMail instances).
Conflicts:
	actionmailer/CHANGELOG.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

place holder previews for NullMail
4 participants