aboutsummaryrefslogtreecommitdiffstats
path: root/actionmailer/lib/action_mailer
Commit message (Collapse)AuthorAgeFilesLines
* Start Rails 5.2 developmentMatthew Draper2017-03-221-2/+2
|
* Document using `default_url_options` in an ActionMailer class.Krzysztof Zych2017-03-081-0/+3
|
* Preparing for 5.1.0.beta1 releaseRafael Mendonça França2017-02-231-1/+1
|
* Freeze fragment cache related instrument name.Stan Lo2017-02-071-1/+1
| | | | | | | | | | | | | ActionMailer::Base#instrument_name and ActionController::Base#instrument_name will be frequently called once caching is enabled. So it's better to freeze them instead of create new string on every call. Also, the instrument name in #instrument_fragment_cache will usually be "write_fragment.action_controller" or "read_fragment.action_controller". So freezing them might also gain some performance improvement. We have done something like this in other places: https://github.com/rails/rails/blob/master/actionview/lib/action_view/template.rb#L348
* Add `:args` to `process.action_mailer` eventyuuji.yaginuma2017-02-041-1/+2
|
* Don't mutate raw_source in mailer preview interceptorEugene Kenny2017-01-301-5/+1
| | | | | | | | 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.
* add default value to `deliver_later_queue_name` option [ci skip]yuuji.yaginuma2017-01-311-1/+1
|
* Document with with an example an link to ParameterizedRafael Mendonça França2017-01-301-1/+6
| | | | | Also change the class_methods to ClassMethods since the former document the method as an instance method of Parameterized not as a class method.
* :scissors:Rafael Mendonça França2017-01-301-1/+1
|
* No need to advertise in the rdoc documentationRafael Mendonça França2017-01-301-3/+0
|
* Implement respond_to_missing? in the Parameterized::Mailer classRafael Mendonça França2017-01-301-6/+11
|
* Remove unneeded nodocRafael Mendonça França2017-01-301-1/+1
|
* Override the initializers instead of using tapRafael Mendonça França2017-01-301-3/+6
| | | | We own the class so we can override the initialize.
* Make internal classes internal for the documentationRafael Mendonça França2017-01-301-2/+2
|
* Make assert_enqueued_emails + assert_no_enqueued_emails consider ↵David Heinemeier Hansson2017-01-301-2/+2
| | | | | | parameterized delivery jobs Needed for testing of parameterized mailers
* [ci skip] other -> order; expand ivarKasper Timm Hansen2017-01-281-1/+2
|
* Offer the option to use parameterization for shared processing of headers ↵David Heinemeier Hansson2017-01-282-7/+147
| | | | | and ivars (#27825) Offer the option to use parameterization for shared processing of headers and ivars
* ZOMG worst typo in my life :scream:Akira Matsuda2017-01-151-1/+1
|
* `respond_to_missing?` should fallback to `super` where method_missing could ↵Akira Matsuda2017-01-151-1/+1
| | | | call `super`
* Reduce string objects by using \ instead of + or << for concatenating stringsAkira Matsuda2017-01-121-2/+2
| | | | (I personally prefer writing one string in one line no matter how long it is, though)
* Merge pull request #27227 from MQuy/allow-custom-content-type-in-mail-bodyRafael Mendonça França2017-01-061-4/+21
|\ | | | | | | Allow to custom content type when setting mailer body
| * Remove unnecessary condition in content_typeMQuy2017-01-061-1/+1
| |
| * Add document in mailerMQuy2016-12-061-0/+13
| |
| * allow context type when set body mailMQuy2016-11-301-4/+8
| |
* | `self.` is not needed when calling its own instance methodAkira Matsuda2017-01-053-3/+3
| | | | | | | | 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-243-24/+18
| |
* | No need to nodoc private methodAkira Matsuda2016-12-241-1/+1
|/
* Add more rubocop rules about whitespacesRafael Mendonça França2016-10-295-10/+10
|
* Fix broken comments indentation caused by rubocop auto-correct [ci skip]Ryuta Kamizono2016-09-141-15/+15
| | | | | | All indentation was normalized by rubocop auto-correct at 80e66cc4d90bf8c15d1a5f6e3152e90147f00772. But comments was still kept absolute position. This commit aligns comments with method definitions for consistency.
* RuboCop is 100% green :tada:Xavier Noria2016-09-021-4/+5
|
* Add load hooks to all tests classesRafael Mendonça França2016-08-251-0/+1
| | | | | | | | | | | | | | | | | | | | | | | Usually users extends tests classes doing something like: ActionView::TestCase.include MyCustomTestHelpers This is bad because it will load the ActionView::TestCase right aways and this will load ActionController::Base making its on_load hooks to execute early than it should. One way to fix this is using the on_load hooks of the components like: ActiveSupport.on_load(:action_view) do ActionView::TestCase.include MyCustomTestHelpers end The problem with this approach is that the test extension will be only load when ActionView::Base is loaded and this may happen too late in the test. To fix this we are adding hooks to people extend the test classes that will be loaded exactly when the test classes are needed.
* Add three new rubocop rulesRafael Mendonça França2016-08-162-4/+4
| | | | | | | | Style/SpaceBeforeBlockBraces Style/SpaceInsideBlockBraces Style/SpaceInsideHashLiteralBraces Fix all violations in the repository.
* applies remaining conventions across the projectXavier Noria2016-08-061-3/+3
|
* normalizes indentation and whitespace across the projectXavier Noria2016-08-062-98/+98
|
* applies new string literal convention in actionmailer/libXavier Noria2016-08-0613-35/+35
| | | | | The current code base is not uniform. After some discussion, we have chosen to go with double quotes by default.
* remove `-t` option from default sendmail arguments [ci skip]yuuji.yaginuma2016-07-062-2/+2
| | | | Follow up to #24436
* Do not suggest nonsensical OpenSSL verify modes [ci skip]Jonne Haß2016-06-071-3/+2
| | | | | | | | | | | | | | | | | | | | | | | SSL_set_verify(3) explains: SSL_VERIFY_FAIL_IF_NO_PEER_CERT Server mode: if the client did not return a certificate, the TLS/SSL handshake is immediately terminated with a "handshake failure" alert. This flag must be used together with SSL_VERIFY_PEER. Client mode: ignored SSL_VERIFY_CLIENT_ONCE Server mode: only request a client certificate on the initial TLS/SSL handshake. Do not ask for a client certificate again in case of a renegotiation. This flag must be used together with SSL_VERIFY_PEER. Client mode: ignored The SMTP connection here uses a OpenSSL socket in client mode, suggesting invalid/ignored flags is rather misleading.
* fix grammarRajat Bansal2016-05-311-1/+1
|
* Action Mailer: Declarative exception handling with `rescue_from`.Jeremy Daer2016-05-154-22/+87
| | | | | | | | | | | | | | | | | | | | | | | Follows the same pattern as controllers and jobs. Exceptions raised in delivery jobs (enqueued by `#deliver_later`) are also delegated to the mailer's rescue_from handlers, so you can handle the DeserializationError raised by delivery jobs: ```ruby class MyMailer < ApplicationMailer rescue_from ActiveJob::DeserializationError do … end ``` ActiveSupport::Rescuable polish: * Add the `rescue_with_handler` class method so exceptions may be handled at the class level without requiring an instance. * Rationalize `exception.cause` handling. If no handler matches the exception, fall back to the handler that matches its cause. * Handle exceptions raised elsewhere. Pass `object: …` to execute the `rescue_from` handler (e.g. a method call or a block to instance_exec) against a different object. Defaults to `self`.
* Start Rails 5.1 development :tada:Rafael Mendonça França2016-05-101-2/+2
|
* Add :ssl/:tls to ActionMailer [ci skip]Pedro Adame Vergara2016-05-091-0/+1
|
* Preparing for 5.0.0.rc1 releaseRafael Mendonça França2016-05-061-1/+1
|
* Prep Rails 5 beta 4eileencodes2016-04-271-1/+1
|
* Clear ActionMailer deliveries on setup and teardownarktisklada2016-04-251-1/+4
| | | | Signed-off-by: Jeremy Daer <jeremydaer@gmail.com>
* Small typo on a method name:Edouard CHIN2016-04-151-2/+2
| | | | - clear_test_deliviers -> clear_test_deliveries
* Merge pull request #24525 from tomkadwill/action-mailer-base-docs2Vipul A M2016-04-141-3/+3
|\ | | | | Update ActionMailer base documentation [ci skip]
| * Update ActionMailer base documentation [ci skip]Tom Kadwill2016-04-131-3/+3
| |
* | Update ActionMailer Views documentation [ci skip]Tom Kadwill2016-04-101-1/+1
|/
* Disallow calling `#deliver_later` after local message modifications.Jeremy Daer2016-04-071-2/+14
| | | | | | | | | | | | | | | | | | | They would be lost when the delivery job is enqueued, otherwise. Prevents a common, hard-to-find bug like: ```ruby message = Notifier.welcome(user, foo) message.message_id = my_generated_message_id message.deliver_later ``` The message_id is silently lost here! *Only the mailer arguments are passed to the delivery job.* This raises an exception now. Make modifications to the message within the mailer method or use a custom Active Job to manage delivery instead of using #deliver_later.
* Sendmail default arguments match Mail::SendMailarktisklada2016-04-051-1/+1
| | | | Removes `-t`