aboutsummaryrefslogtreecommitdiffstats
path: root/guides/source/configuring.md
diff options
context:
space:
mode:
authorLeonard Garvey <lengarvey@gmail.com>2014-06-30 00:12:25 +1000
committerLeonard Garvey <lengarvey@gmail.com>2014-07-01 14:39:59 +1000
commit84ed7b8dfeb2ba47ca8c1b0767c85bbf200e786b (patch)
treec4c2bb39d5571fd3a4228f2ab42795997f0293b5 /guides/source/configuring.md
parentb4b6248b90ac62ece6a46bee4d36868d19444df3 (diff)
downloadrails-84ed7b8dfeb2ba47ca8c1b0767c85bbf200e786b.tar.gz
rails-84ed7b8dfeb2ba47ca8c1b0767c85bbf200e786b.tar.bz2
rails-84ed7b8dfeb2ba47ca8c1b0767c85bbf200e786b.zip
Add configuration to enable mail previews
Adds `config.action_mailer.preview_enabled` This allows mail previewing to be enabled easily in non-development environments such as staging. The default is set to true for development so no changes should be required to existing Rails applications. The mail preview path can still be configured using the existing `config.action_mailer.preview_path` configuration option. Adding this avoids devs from having to do stuff like: https://gist.github.com/lengarvey/fa2c9bd6cdbeba96526a Update actionmailer/CHANGELOG with new configuration. Update configuring guide with new configuratation. Add `config.action_mailer.preview_path` to configuring guide.
Diffstat (limited to 'guides/source/configuring.md')
-rw-r--r--guides/source/configuring.md12
1 files changed, 12 insertions, 0 deletions
diff --git a/guides/source/configuring.md b/guides/source/configuring.md
index f74fbaa7c3..68f03c5430 100644
--- a/guides/source/configuring.md
+++ b/guides/source/configuring.md
@@ -453,6 +453,18 @@ There are a number of settings available on `config.action_mailer`:
config.action_mailer.interceptors = ["MailInterceptor"]
```
+* `config.action_mailer.preview_path` specifies the location of mailer previews.
+
+ ```ruby
+ config.action_mailer.preview_path = "#{Rails.root}/lib/mailer_previews"
+ ```
+
+* `config.action_mailer.preview_enabled` enable or disable mailer previews. By default this is `true` in development.
+
+ ```ruby
+ config.action_mailer.preview_enabled = false
+ ```
+
### Configuring Active Support
There are a few configuration options available in Active Support: