aboutsummaryrefslogtreecommitdiffstats
path: root/actionmailer/lib/action_mailer/preview.rb
Commit message (Collapse)AuthorAgeFilesLines
* Enable `Layout/EmptyLinesAroundAccessModifier` copRyuta Kamizono2019-06-131-1/+0
| | | | | | | | | | | We sometimes say "✂️ newline after `private`" in a code review (e.g. https://github.com/rails/rails/pull/18546#discussion_r23188776, https://github.com/rails/rails/pull/34832#discussion_r244847195). Now `Layout/EmptyLinesAroundAccessModifier` cop have new enforced style `EnforcedStyle: only_before` (https://github.com/rubocop-hq/rubocop/pull/7059). That cop and enforced style will reduce the our code review cost.
* ActionMailer::Base can unregister observer(s) and interceptor(s). (#32207)Kota Miyake2018-05-301-5/+22
| | | | | | | | | | | | | | | | | | | | | | | | * ActionMailer::Base can unregister observer(s) and interceptor(s). One or multiple mail observers can be unregistered using `ActionMailer::Base.unregister_observers` or `ActionMailer::Base.unregister_observer`. One or multiple mail interceptors can be unregistered using `ActionMailer::Base.unregister_interceptors` or `ActionMailer::Base.unregister_interceptor`. For preview interceptors, it's possible to use `ActionMailer::Base.unregister_preview_interceptors` or `ActionMailer::Base.unregister_preview_interceptor`. * Ensure to be reset registered observer(s) and interceptor(s) * Add explanation to CHANGELOG * Add original author's name [Kota Miyake + Rafael Mendonça França + Claudio Ortolina]
* Sort mailer previewsDwight Watson2017-11-141-1/+1
|
* Update Action Mailer doc [ci skip]Yoshiyuki Hirano2017-08-301-4/+4
|
* Use frozen string literal in actionmailer/Kir Shatrov2017-07-231-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
|
* Use mattr_accessor default: option throughout the projectGenadi Samokovarov2017-06-031-2/+1
|
* Pass request params to ActionMailer::PreviewAlexey Zapparov2017-03-011-2/+8
|
* `self.` is not needed when calling its own instance methodAkira Matsuda2017-01-051-1/+1
| | | | Actually, private methods cannot be called with `self.`, so it's not just redundant, it's a bad habit in Ruby
* Privatize unneededly protected methods in Action MailerAkira Matsuda2016-12-241-5/+5
|
* RuboCop is 100% green :tada:Xavier Noria2016-09-021-4/+5
|
* Add three new rubocop rulesRafael Mendonça França2016-08-161-3/+3
| | | | | | | | Style/SpaceBeforeBlockBraces Style/SpaceInsideBlockBraces Style/SpaceInsideHashLiteralBraces Fix all violations in the repository.
* applies remaining conventions across the projectXavier Noria2016-08-061-3/+3
|
* applies new string literal convention in actionmailer/libXavier Noria2016-08-061-2/+2
| | | | | The current code base is not uniform. After some discussion, we have chosen to go with double quotes by default.
* Revert "Merge pull request #18446 from ↵Sean Griffin2015-11-231-25/+7
| | | | | | | | | cloud8421/actionmailer-unregister-interceptor" This reverts commit 65a61ab7c370d2894c11ce276725f723a5c9c111, reversing changes made to 14314ca18302f18c3d8bb7a63e9f71ac4c2290c2. This PR broke the build
* Merge pull request #18446 from cloud8421/actionmailer-unregister-interceptorSean Griffin2015-11-231-7/+25
|\ | | | | | | ActionMailer::Base can unregister interceptor(s).
| * ActionMailer::Base can unregister interceptor(s).Claudio Ortolina2015-01-311-7/+25
| | | | | | | | | | | | | | | | | | | | | | | | One or multiple mail interceptors can be unregistered using `ActionMailer::Base.unregister_interceptors` or `ActionMailer::Base.unregister_interceptor`. For preview interceptors, it's possible to use `ActionMailer::Base.unregister_preview_interceptors` or `ActionMailer::Base.unregister_preview_interceptor`. Refactors logic to constantize a string/symbol into separate method.
* | Add missing punctuation mark to all ActionMailer docs [ci skip]amitkumarsuroliya2015-09-281-6/+6
| |
* | Document inline image mailer preview interceptorAndrew White2015-05-041-49/+1
| | | | | | | | Explain what the interceptor is used for and how to remove it.
* | Add support for inline images to mailer previewsAndrew White2015-05-041-1/+49
|/ | | | | Use a preview interceptor to search for inline cid: urls in src attributes and convert them to data urls.
* Make ActionMailer::Previews methods class methods.Abdelkader Boudih2014-08-141-0/+2
|
* Rename preview_enabled option to show_previewsRafael Mendonça França2014-07-011-4/+4
|
* Add configuration to enable mail previewsLeonard Garvey2014-07-011-0/+12
| | | | | | | | | | | | | | | | | | 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.
* Fix typo [ci skip]Rafael Mendonça França2014-02-161-1/+1
|
* Don't use a class_attribute for ActionMailer::Base.preview_pathAndrew White2014-01-261-6/+2
| | | | | Since preview_path is read from ActionMailer::Base when previewing, subclasses can’t change it so don’t there's no need for the extra overhead imposed by using it.
* Add the ability to intercept emails before previewingAndrew White2014-01-261-2/+37
| | | | | | | | | | | | | | | | To support the ability for tools like CSS style inliners to operate on emails being previewed this commit adds a hook in a similar fashion to the existing delivery interceptor hook, e.g: class CSSInlineStyler def self.previewing_email(message) # inline CSS styles end end ActionMailer::Base.register_preview_interceptor CSSInlineStyler Fixes #13622.
* Add preview_path to autoload_paths in after_initializeAndrew White2014-01-041-1/+7
| | | | | | | | | | 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/+67