| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
| |
A few have been left for aesthetic reasons, but have made a pass
and removed most of them.
Note that if the method `foo` returns an array, `foo << 1`
is a regular push, nothing to do with assignments, so
no self required.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Implement naive partial caching mechanism.
Add test for LogSubscriber
Use ActionView::Base#log_payload to store log_subscriber's payload, so we can pass cache result into it.
Fixed tests
Remove useless settings
Check if #log_payload exists before calling it. Because other classes also includes CacheHelper but don't have is attribute
Use @log_payload_for_partial_reder instead of #log_payload to carry ActionView's payload.
Update test's hash syntax
Add configuration to enable/disable fragment caching logging
Remove unless test and add new test to ensure cache info won't effect next rendering's log
Move :enable_fragment_cache_logging config from ActionView to ActionPack
Apply new config to tests
Update actionview's changelog
Update configuration guide
Improve actionview's changelog
Refactor PartialRenderer#render and log tests
Mute subscriber's log instead of disabling instrumentation.
Fix typo, remove useless comment and use new hash syntax
Improve actionpack's log_subscriber test
Fix rebase mistake
Apply new config to all caching intstrument actions
|
| |
|
| |
|
| |
|
|
|
|
|
| |
The current code base is not uniform. After some discussion,
we have chosen to go with double quotes by default.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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`.
|
|\
| |
| | |
Expand on Action Mailer Fragment caching tests
|
| | |
|
|/
|
|
| |
Signed-off-by: Jeremy Daer <jeremydaer@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Removes `-t`
|
|
|
|
|
| |
"Using a dynamic :controller (or :action) segment in a route is deprecated"
by 6520ea5f7e2215a763ca74bf6cfa87be2347d5df (#23980).
|
| |
|
|
|
|
|
|
| |
including it
Remove useless helper in ActionDispatch::Caching and fix indentation
|
|
|
|
| |
and ActionController to include it
|
| |
|
|
|
|
|
|
| |
'actionmailer/test/mailers/async_mailer.rb' was deleted by
f9da785d0b1b22317cfca25c15fb555e9016accb .
This template is not used now.
|
|
|
|
|
|
|
|
|
| |
cloud8421/actionmailer-unregister-interceptor"
This reverts commit 65a61ab7c370d2894c11ce276725f723a5c9c111, reversing
changes made to 14314ca18302f18c3d8bb7a63e9f71ac4c2290c2.
This PR broke the build
|
|\
| |
| |
| | |
ActionMailer::Base can unregister interceptor(s).
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Since `bin/test` would define `Rails.root` before loading AM but `bundle
exec rake` would define it after loading AM, this lead to the following
test failure when using `bin/test`:
```
--- expected
+++ actual
@@ -1 +1 @@
-{:location=>"/var/folders/_r/9kh50y4j0vn7zgg2p65z1lcm0000gn/T/mails"}
+{:location=>"/Users/senny/Projects/rails/actionmailer/tmp/mails"}
```
This patch ensures that `Rails.root` is defined when loading AM to
achieve consistent test results.
|
| |
| |
| |
| |
| | |
When `require 'active_support/rails'`, 'active_support/deprecation'
is automatically loaded.
|
| |
| |
| | |
As `deliver_now` `RuntimeError` for both nil & unknown delivery method so it’s good to have assertion for error messages
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| | |
Example
````ruby
mail(hash) do |format|
format.any
end
````
|
| |
| |
| |
| | |
method_call_assertions
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| | |
xijo/action_mailer_message_delivery_respects_i18n_locale"
This reverts commit f2a8c23654d69dd8f294971487b5abf0e5d891c3, reversing
changes made to 3046c9bbe154aa717a5147091be8b495ed8969c4.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When #deliver_now is called all translations within the
generated email will be looked up for the current I18n
locale.
I18n.locale = ‘de’
mail.deliver_now # Generates german email, correct
In #enqueue_delivery the locale was not considered and
the resulting job uses the default locale.
I18n.locale = ‘de’
mail.deliver_later # Generate english email, incorrect
In order to achieve a consistent behaviour the current locale
is now always passed to `ActionMailer::DeliveryJob`.
|
|\ \
| | |
| | |
| | |
| | |
| | | |
chrismcg/allow_deliver_later_queue_name_to_be_configured
Allow configuration of ActionMailer queue name
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | | |
```
it added in this commit (https://github.com/rails/rails/commit/2a25c4ce6da6ea23ebdf44e7eb2d2441dbea20a1), now no warnings occur.
```
|
| | |
| | |
| | |
| | |
| | | |
- as core_ext is not used and test pass locally
- mail is already required in abstract_unit
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This reverts commit 2f52f969885b2834198de0045748436a4651a94e.
Conflicts:
actionmailer/test/abstract_unit.rb
actionview/test/abstract_unit.rb
activemodel/test/cases/helper.rb
activerecord/test/cases/helper.rb
activesupport/test/abstract_unit.rb
railties/test/abstract_unit.rb
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | | |
onwards.
|
|/ /
| |
| |
| | |
ref: https://github.com/rails/rails/pull/18763#issuecomment-72349769
|
|/
|
|
|
|
|
|
|
|
|
|
| |
In order to run whether the `welcome` method of the ActionMailer::Base
subclass raises an error, `message` must be called, otherwise the method
is not executed at all.
You could just replace with `def welcome; raise StandardError; end` and you
would still see a passing test.
This commit fixes the test so the assertion is actually executed, just like
any other tests in the file, where `.message` is called.
|
| |
|
|
|
|
|
| |
These methods were deprecated in Rails 4.2 (see f4ee1147) so they can
be safely removed in Rails 5.0.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Given the following templates:
mailer/demo.html.erb
mailer/demo.en.html.erb
mailer/demo.pt.html.erb
Before this change for a locale that doesn't have its related file
the `mailer/demo.html.erb` will
be rendered even if `en` is the default locale.
Now `mailer/demo.en.html.erb` has precedence over the file without
locale.
Also, it is possible to give a fallback.
mailer/demo.pt.html.erb
mailer/demo.pt-BR.html.erb
So if the locale is `pt-PT`, `mailer/demo.pt.html.erb` will be
rendered given the right I18n fallback configuration.
Fixes #11884.
|
| |
|
| |
|
| |
|
|
|
| |
Include appropriate helpers and use `assert_dom_equal` where applicable
|