Make environment name and intercept mail customizable#13
Make environment name and intercept mail customizable#13neerajsingh0101 merged 2 commits intobigbinary:masterfrom
Conversation
|
@monkbroc I like the idea. Here are my thoughts. I also like the switch to So currently proposed change looks like this I think we can take it even one step further. Whether to intercept email decision should solely be decided by key In the above the case the proposed solution would look like this. If nothing is passed in Let me know your thoughts. |
|
Great suggestions. Additionally an object to pass the environment name and |
|
Great. So @monkbroc want to work on that. Or I can take care of it in next few days. Lemme know. |
|
I updated the PR with another commit that implements what I said
|
Make environment name and intercept mail customizable
I found the need to use something other than
Rails.env.production?to decide whether to intercept mail. This is because my staging instance is very close to the production instance, down to theRAILS_ENVvalue set to production.I'm following the recommendations from Heroku and using environment variables for the few things that should be different between the different instances.
This PR allows for passing the name of the environment and whether mail should be intercepted as options.
I also think it's useful to rename
production?tointercept_mail?because I may want to send mail in my demo instance, even though it's not strictly a production environment.Let me know you thoughts on these changes.