| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
Previously this used self.formats= to set the format which render would
use to find templates. This worked, but was untested, and looked a
little confusing because it was doing the mutation within a loop.
This commit replaces the assignment with passing formats: [format] into
the render call, which makes it more obvious that that's the purpose of
the format. It also adds a test to verify the formats being used.
|
|
|
|
|
|
| |
Since production applications typically run with log level info and
email adresses should be considered as sensitive data we want to prevent
them from ending up in the logs. In development mode (with log level
debug) they are still logged as part of the Mail::Message object.
|
|\
| |
| |
| | |
ActionMailer: support overriding template name in multipart
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Implicit rendering in multipart blocks now also uses the template
name from the options hash instead of always using the action name.
So you can now write
mail(template_name: template_name) do |format|
format.text
format.html
end
|
| | |
|
| |
| |
| |
| |
| |
| |
| | |
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.
|
| | |
|
| |
| |
| |
| |
| | |
This reverts commit 3420a14590c0e6915d8b6c242887f74adb4120f9, reversing
changes made to afb66a5a598ce4ac74ad84b125a5abf046dcf5aa.
|
| | |
|
| |
| |
| |
| |
| | |
and ivars (#27825)
Offer the option to use parameterization for shared processing of headers and ivars
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| | |
Style/SpaceBeforeBlockBraces
Style/SpaceInsideBlockBraces
Style/SpaceInsideHashLiteralBraces
Fix all violations in the repository.
|
| | |
|
| | |
|
| |
| |
| |
| |
| | |
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`.
|
| | |
|
|/ |
|
|
|
|
|
|
|
|
| |
Example
````ruby
mail(hash) do |format|
format.any
end
````
|
| |
|
| |
|
|
|
|
|
|
| |
Invoke mailer defaults as procs only if they are procs, do not convert
with to_proc. That an object is convertible to a proc does not mean it's
meant to be always used as a proc. Fixes #11533
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
# config/locales/en.yml
en:
user_mailer:
welcome:
subject: 'Hello, %{username}'
# app/mailers/user_mailer.rb
class UserMailer < ActionMailer::Base
def welcome(user)
mail(subject: default_i18n_subject(username: user.name))
end
end
|
|
|
|
| |
with Rails 4.0.
|
| |
|
| |
|
| |
|
|
|
|
| |
the queued message wrappers so the queue itself needn't be marshaled (due to queue reference QueuedMessage).
|
| |
|
|
|
|
|
|
|
|
| |
Any ActionMailer class can be set to render and delier messages using
the new Rails Queue.
Some of this work was borrowed (with permission) from Nick Plante's
(zapnap) reqsue_mailer gem.
|
| |
|
| |
|
|
|
|
| |
virtual path.
|
|
|
|
| |
's/[ \t]*$//' -i {} \;)
|
|
AbstractController which fixes issues with asset_host in ActionMailer
Including:
- Moved mailer objects in separate directory
- Added two tests for asset_host configuration option
|