David Heinemeier Hansson
1cec84ad2d
Offer the option to use parameterization for shared processing of headers and ivars ( #27825 )
...
Offer the option to use parameterization for shared processing of headers and ivars
2017-01-28 11:20:46 +01:00
Rafael Mendonça França
fe1f4b2ad5
Add more rubocop rules about whitespaces
2016-10-29 01:17:49 -02:00
Rafael Mendonça França
79a5ea9ead
Remove deprecated support to :text in render
2016-10-10 00:02:52 -03:00
Rafael Mendonça França
55f9b8129a
Add three new rubocop rules
...
Style/SpaceBeforeBlockBraces
Style/SpaceInsideBlockBraces
Style/SpaceInsideHashLiteralBraces
Fix all violations in the repository.
2016-08-16 04:30:11 -03:00
Xavier Noria
b326e82dc0
applies remaining conventions across the project
2016-08-06 20:20:22 +02:00
Xavier Noria
80e66cc4d9
normalizes indentation and whitespace across the project
2016-08-06 20:16:27 +02:00
Xavier Noria
b91ff557ef
applies new string literal convention in actionmailer/test
...
The current code base is not uniform. After some discussion,
we have chosen to go with double quotes by default.
2016-08-06 19:03:39 +02:00
Jeremy Daer
e35b98e6f5
Action Mailer: Declarative exception handling with rescue_from
.
...
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`.
2016-05-15 18:44:16 -07:00
Vipul A M
cbb25c4b1c
Expand on Action Mailer Fragment caching tests
2016-04-17 23:16:09 +05:30
Stan Lo
049b6e670f
Porting ActionController::Caching to ActionMailer::Caching
2016-02-23 21:04:16 -03:00
Ronak Jangir
fef6c11d2a
Added test for any
if called without specifying any format
...
Example
````ruby
mail(hash) do |format|
format.any
end
````
2015-09-18 22:56:42 +05:30
Abdelkader Boudih
67f8b6b2bc
Added ActionMailer::DeliverLater
2014-08-13 11:36:32 +00:00
Mr A
3134605391
Ruby's new Hash syntax applied in actionmailer
2013-11-14 13:41:37 +05:30
Alex Tsukernik
49185875a5
don't convert mailer default values to procs
...
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
2013-07-22 14:25:20 -04:00
kennyj
98849c71ac
Fix AM testcase break with mail 2.5.4. It seems that AM's testcase was wrong.
2013-05-17 09:44:01 +09:00
Vipul A M
6893c23f48
drop an unused hash; change slang to SPECIAL
2013-03-19 11:00:01 +05:30
Olek Janiszewski
57bfbc249e
Allow passing interpolations to #default_i18n_subject
, e.g.:
...
# 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
2013-01-24 15:29:24 +01:00
Jeremy Kemper
f9da785d0b
Move background jobs to the 'jobs' branch until fully baked. Not shipping with Rails 4.0.
2012-12-21 16:29:47 -08:00
Yves Senn
ec3429a3d6
The return value from mailer methods is not relevant.
2012-12-10 09:10:47 +01:00
Yves Senn
b786f065d3
Do not render views when mail() isn't called. (NullMail refactoring)
2012-10-28 20:45:43 +01:00
Kirill Nikitin
96f290eac0
Update actionmailer with new hash syntax.
2012-10-07 21:54:14 +04:00
Jeremy Kemper
2a301505ec
Use synchronous queue by default. Separate queued message delivery jobs from the queued message wrappers so the queue itself needn't be marshaled (due to queue reference QueuedMessage).
2012-09-16 22:37:47 -07:00
Santiago Pastorino
34b23e7110
Action Mailer async flag is true by default using a Synchronous impl
2012-09-11 15:11:52 -07:00
Brian Cardarella
dc7fd821dc
Asynchronous ActionMailer
...
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.
2012-06-23 14:36:09 -04:00
José Valim
119e9e2daf
Get rid of update_details in favor of passing details to find_template.
2011-09-22 15:03:05 +02:00
José Valim
972efa11fd
Deprecate the old mailer API that was not deprecated yet.
2010-08-29 20:42:13 -03:00
José Valim
84cab320bc
Ensure templates like template.html are found but still uses the proper virtual path.
2010-08-26 16:07:54 -03:00
Santiago Pastorino
b451de0d6d
Deletes trailing whitespaces (over text files only find * -type f -exec sed 's/[ \t]*$//' -i {} \;)
2010-08-14 04:12:33 -03:00
Jeroen van Dijk and Josh Kalderimis
affeb51569
Move config_accessor :asset_host from ActionController::Base to AbstractController which fixes issues with asset_host in ActionMailer
...
Including:
- Moved mailer objects in separate directory
- Added two tests for asset_host configuration option
2010-07-24 00:27:25 +02:00