1. 05 12月, 2018 1 次提交
  2. 23 11月, 2018 1 次提交
  3. 22 11月, 2018 1 次提交
    • E
      Fix ActionMailer assertion not working for mail defining delivery_job: · e139a3ce
      Edouard CHIN 提交于
      - If a Mail defines a custom delivery_job, all ActionMailer assertion
        helper (assert_emails, assert_enqueued_emails ...) wouldn't work.
      
        ```ruby
          MyMailer < ApplicationMailer
            self.delivery_job = MyJob
          end
      
          # This assertion will fail
          assert_emails(1) do
            MyMailer.my_mail.deliver_later
          end
      
        This PR leverage the new ActiveJob feature that accepts Procs for the
        `only` keyword and check if the delivery job is one of ActionMailer
         registered ones.
      e139a3ce
  4. 06 10月, 2018 1 次提交
    • L
      Parameterized mailers can configure delivery job · c90c6c13
      Luke Pearce 提交于
      Setting parameterized_delivery_job on a mailer class will cause Parameterized::MessageDelivery to use
      the specified job instead of ActionMailer::Parameterized::DeliveryJob:
      
          class MyMailer < ApplicationMailer
            self.parameterized_delivery_job = MyCustomDeliveryJob
            ...
          end
      c90c6c13
  5. 13 9月, 2018 1 次提交
  6. 09 9月, 2018 1 次提交
  7. 08 9月, 2018 1 次提交
  8. 29 6月, 2018 1 次提交
    • B
      Allow call `assert_enqueued_with` and `assert_enqueued_email_with` with no block · 4382fcbc
      bogdanvlviv 提交于
      Example of `assert_enqueued_with` with no block
      ```ruby
      def test_assert_enqueued_with
        MyJob.perform_later(1,2,3)
        assert_enqueued_with(job: MyJob, args: [1,2,3], queue: 'low')
      
        MyJob.set(wait_until: Date.tomorrow.noon).perform_later
        assert_enqueued_with(job: MyJob, at: Date.tomorrow.noon)
      end
      ```
      
      Example of `assert_enqueued_email_with` with no block:
      ```ruby
      def test_email
        ContactMailer.welcome.deliver_later
        assert_enqueued_email_with ContactMailer, :welcome
      end
      
      def test_email_with_arguments
        ContactMailer.welcome("Hello", "Goodbye").deliver_later
        assert_enqueued_email_with ContactMailer, :welcome, args: ["Hello", "Goodbye"]
      end
      ```
      
      Related to #33243
      4382fcbc
  9. 31 5月, 2018 1 次提交
    • K
      ActionMailer::Base can unregister observer(s) and interceptor(s). (#32207) · b74edd37
      Kota Miyake 提交于
      * 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]
      b74edd37
  10. 24 5月, 2018 1 次提交
    • S
      Eager autoload mail gem when eager load is true (#32808) · 4d43b058
      Samuel Cochran 提交于
      * Eager autoload mail gem when eager load is true
      
      We had a production issue where our Sidekiq worker threads all became
      deadlocked while autoloading a file within the mail gem, required via
      ActionMailer, despite setting our Rails applicaiton to eager load.
      `Mail.eager_autoload!` exists and works great, ActionMailer just doesn't
      call it during eager loading. Adding it to the ActionMailer Railtie's
      eager_load_namespaces takes care of calling `Mail.eager_autoload!`
      during the `eager_load!` initializer.
      
      * 'Mail' isn't defined yet, use before_eager_load instead
      
      * Make sure mail is loaded
      
      * Move eager load of Mail into ActionMailer.eager_load!
      
      [Samuel Cochran + Rafael Mendonça França]
      4d43b058
  11. 18 2月, 2018 1 次提交
  12. 31 1月, 2018 1 次提交
  13. 29 11月, 2017 1 次提交
  14. 28 11月, 2017 1 次提交
  15. 04 10月, 2017 1 次提交
  16. 28 9月, 2017 1 次提交
  17. 29 8月, 2017 1 次提交
    • J
      Fix AM::Base.default proc arity breaking change · fbb2fc8a
      Jimmy Bourassa 提交于
      PR #29270 changed the number of arguments that gets passed to Procs
      defined in ActionMail::Base.default. With this changeset, Procs can
      now have 1 or 0 arguments
      
      Also adds test coverage for AM::Base.default Proc arity.
      fbb2fc8a
  18. 15 6月, 2017 2 次提交
  19. 22 3月, 2017 1 次提交
  20. 24 2月, 2017 1 次提交
  21. 22 2月, 2017 1 次提交
  22. 04 2月, 2017 1 次提交
  23. 28 1月, 2017 1 次提交
  24. 01 12月, 2016 1 次提交
  25. 16 5月, 2016 1 次提交
    • J
      Action Mailer: Declarative exception handling with `rescue_from`. · e35b98e6
      Jeremy Daer 提交于
      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`.
      e35b98e6
  26. 10 5月, 2016 1 次提交
  27. 07 5月, 2016 1 次提交
  28. 28 4月, 2016 1 次提交
  29. 11 4月, 2016 1 次提交
    • V
      Pass over AM changelog · 829650eb
      Vipul A M 提交于
      - Fixed statement about setting `config.action_mailer.default_url_options = {protocol: 'https'}` . We are just setting the protocol key to 'https', not replacing/initializing the complete config.
      - Fixed grammar in assert_emails changlog
      - Added sentence separator for code ":"
      
      [ci skip]
      829650eb
  30. 08 4月, 2016 1 次提交
    • J
      Disallow calling `#deliver_later` after local message modifications. · 95e06e66
      Jeremy Daer 提交于
      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.
      95e06e66
  31. 06 4月, 2016 1 次提交
  32. 30 3月, 2016 1 次提交
  33. 25 2月, 2016 1 次提交
  34. 24 2月, 2016 1 次提交
  35. 16 2月, 2016 1 次提交
    • Y
      reset `ActionMailer::Base.deliveries` in `ActionDispatch::IntegrationTest`. · 9d378747
      Yves Senn 提交于
      Whenever you are sending emails in integration tests using the `:test`
      delivery method you need to make sure that
      `ActionMailer::Base.deliveries` is reset after every test. This piece of
      boilerplate code is present in all my applications that send
      emails. Let's have `ActionDispatch::IntegrationTest` reset the
      deliveries automatically.
      9d378747
  36. 02 2月, 2016 1 次提交
  37. 22 12月, 2015 1 次提交
  38. 21 12月, 2015 1 次提交
    • G
      No more no changes entries in the CHANGELOGs · c5b6ec7b
      Genadi Samokovarov 提交于
      During the `5.0.0.beta1` release, the CHANGELOGs got an entry like the
      following:
      
      ```
      * No changes.
      ```
      
      It is kinda confusing as there are indeed changes after it. Not a
      biggie, just a small pass over the CHANGELOGs.
      
      [ci skip]
      c5b6ec7b
  39. 19 12月, 2015 1 次提交