aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test/application/mailer_previews_test.rb
Commit message (Collapse)AuthorAgeFilesLines
* Use assert_predicate and assert_not_predicateDaniel Colson2018-01-251-3/+3
|
* Add locale selector to email preview (#31596)Hitoshi Nakashima2018-01-181-6/+62
| | | | - Add set_locale to detect suitable locale - Make feature compatible with Rails 5.x
* Fix RuboCop offensesKoichi ITO2017-08-161-2/+2
| | | | And enable `context_dependent` of Style/BracesAroundHashParameters cop.
* Adding frozen_string_literal pragma to Railties.Pat Allan2017-08-141-0/+2
|
* Revert "Merge pull request #29540 from kirs/rubocop-frozen-string"Matthew Draper2017-07-021-1/+0
| | | | | This reverts commit 3420a14590c0e6915d8b6c242887f74adb4120f9, reversing changes made to afb66a5a598ce4ac74ad84b125a5abf046dcf5aa.
* Enforce frozen string in RubocopKir Shatrov2017-07-011-0/+1
|
* Pass request params to ActionMailer::PreviewAlexey Zapparov2017-03-011-0/+51
|
* Don't mutate raw_source in mailer preview interceptorEugene Kenny2017-01-301-0/+34
| | | | | | | | The raw_source method is documented as returning the exact value that was used to create the body; mutating it breaks that contract. Additionally, if the value used to create the body is blank, raw_source returns a frozen string which causes the interceptor to raise an error.
* remove redundant curlies from hash argumentsXavier Noria2016-08-061-1/+1
|
* applies new string literal convention in railties/testXavier Noria2016-08-061-78/+78
| | | | | The current code base is not uniform. After some discussion, we have chosen to go with double quotes by default.
* Fix typo in mailer previews test description [ci skip]Gale Shafer2016-07-141-1/+1
| | | | | A mailer preview test description misspelled the word configuration. This commit updates the test description to spell the word correctly.
* Remove unused boot_rails method and it's usagePrathamesh Sonpatki2016-07-041-1/+0
| | | | | - The `boot_rails` method from abstract_unit.rb is empty after 2abcdfd978fdcd491576a237e8c6b. - So let's remove it and its usage.
* Fix displaying mailer previews on non local requests.Wojciech Wnętrzak2015-09-171-1/+1
| | | | | When config `action_mailer.show_previews` is set, previews are displayed regardless of local request check.
* 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