-
-
Notifications
You must be signed in to change notification settings - Fork 530
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
4 changed files
with
18 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,13 +3,17 @@ module Generators | |
class EmailGenerator < Rails::Generators::Base | ||
source_root File.expand_path("../../templates/email", __FILE__) | ||
desc <<~MARKDOWN | ||
Intercepts emails in non-production environments by setting `INTERCEPTOR_ADDRESSES`. | ||
[Intercept][] emails in non-production environments by setting `INTERCEPTOR_ADDRESSES`. | ||
```sh | ||
INTERCEPTOR_ADDRESSES="[email protected],[email protected]" bin/rails s | ||
``` | ||
Configures `default_url_options` in `test` and `development`. | ||
Configuration can be found at `config/initializers/email_interceptor.rb`. | ||
Interceptor can be found at `app/mailers/email_interceptor.rb`. | ||
[Intercept]: https://guides.rubyonrails.org/action_mailer_basics.html#intercepting-emails | ||
MARKDOWN | ||
|
||
def create_email_interceptor | ||
|