aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test/application/mailer_previews_test.rb
Commit message (Collapse)AuthorAgeFilesLines
* Document inline image mailer preview interceptorAndrew White2015-05-041-5/+5
| | | | Explain what the interceptor is used for and how to remove it.
* Add support for inline images to mailer previewsAndrew White2015-05-041-6/+8
| | | | | Use a preview interceptor to search for inline cid: urls in src attributes and convert them to data urls.
* Fix mailer previews with attachmentsAndrew White2015-05-041-0/+190
| | | | | | Use the mail gem's own API to locate the correct part. Fixes #14435.
* Mailer preview now uses `url_for` to fix links to emails for apps running on ↵Remo Mueller2015-04-301-0/+30
| | | | a subdirectory, closes #19092.
* mailer previews for `NullMail` instances. Closes #19849.Yves Senn2015-04-281-0/+26
|
* Remove deprecate `*_path` helpers in email viewsRafael Mendonça França2015-01-041-52/+0
|
* fixing mailer previews for apps with globbing routeOleg2014-12-031-0/+11
|
* Deprecate `*_path` methods in mailers@schneems and @sgrif2014-07-301-0/+52
| | | | | | | | | | | Email does not support relative links since there is no implicit host. Therefore all links inside of emails must be fully qualified URLs. All path helpers are now deprecated. When removed, the error will give early indication to developers to use `*_url` methods instead. Currently if a developer uses a `*_path` helper, their tests and `mail_view` will not catch the mistake. The only way to see the error is by sending emails in production. Preventing sending out emails with non-working path's is the desired end goal of this PR. Currently path helpers are mixed-in to controllers (the ActionMailer::Base acts as a controller). All `*_url` and `*_path` helpers are made available through the same module. This PR separates this behavior into two modules so we can extend the `*_path` methods to add a Deprecation to them. Once deprecated we can use this same area to raise a NoMethodError and add an informative message directing the developer to use `*_url` instead. The module with warnings is only mixed in when a controller returns false from the newly added `supports_relative_path?`. Paired @sgrif & @schneems
* Rename preview_enabled option to show_previewsRafael Mendonça França2014-07-011-3/+3
|
* Add configuration to enable mail previewsLeonard Garvey2014-07-011-0/+14
| | | | | | | | | | | | | | | | | | 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.
* Add preview_path to autoload_paths in after_initializeAndrew White2014-01-041-1/+41
| | | | | | | | | | Only config.autoload_paths is frozen, so add the preview_path to ActiveSupport::Dependencies.autoload_paths directly in an after_initialize block. Also protect against a blank preview_path being added to autoload_paths which can cause a serious slowdown as Dir[] tries to load all *_preview.rb files under / Fixes #13372
* Add mailer previews feature based on mail_view gemAndrew White2013-12-171-0/+388