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

Add new Rails/MailerPreviews cop #686

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

fatkodima
Copy link
Contributor

Closes #654

Currently, rails supports only single preview path: https://github.com/rails/rails/blob/af0733a8e7ceddf6b9128ad2aaf4f74c5b427c43/actionmailer/lib/action_mailer/railtie.rb#L28

In the future, this will change: rails/rails#31595

So I created PreviewPaths config as an array.

@bdewater
Copy link
Contributor

FWIW I'd love to have this!

@bdewater
Copy link
Contributor

@koic this PR seems to have been missed, I'd still love to have it. Any chance you could review when you have time? Thanks! 🙏

@fatkodima
Copy link
Contributor Author

Rebased.

@NiklasHae
Copy link

We gave this Rails/MailerPreviews cop a try in two different projects with RSpec and it worked perfectly for our use case. Great job @fatkodima!

In combination with the following rspec snippet forgotten and broken previews would be a thing of the past :D

Let me know if there's anything I can do to help get this PR merged 👍

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.

New cop to check that email preview exists
3 participants