Commit Graph

1260 Commits

Author SHA1 Message Date
claudiob
e4613c97c3 Fix assertion that was never run
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.
2015-01-11 11:50:29 -08:00
Carlos Souza
6870d48d19 Add _mailer suffix to i18n path
For mailers created via generators

Follow up to #18074
2015-01-08 22:24:22 -05:00
George Claghorn
3f17fbd68d Add assert_enqueued_emails and assert_no_enqueued_emails 2015-01-08 09:41:22 -05:00
Carlos Antonio da Silva
f9e0ec5449 Move changelog entry to the top [ci skip] 2015-01-07 07:44:57 -02:00
Carlos Souza
5697bdbb6d Add mailer suffix to generated files and classes
Following the same naming convention used in
controllers and jobs.
2015-01-06 10:46:22 -05:00
Rafael Mendonça França
bf7b8c193f Remove unneeded requires
These requires were added only to change deprecation message
2015-01-04 12:11:03 -03:00
Rafael Mendonça França
d282125a18 Remove deprecate *_path helpers in email views 2015-01-04 11:58:42 -03:00
claudiob
755dcd0691 Remove deprecated ActionMailer deliver & deliver!
These methods were deprecated in Rails 4.2 (see f4ee1147) so they can
be safely removed in Rails 5.0.
2015-01-04 11:58:41 -03:00
Robin Dupret
24637e577c Merge pull request #18271 from arunagw/change-copyright-year
Update copyright notices to 2015 [ci skip]
2015-01-01 00:08:17 +01:00
Robin Dupret
ae08bef428 Changelog edits [ci skip] 2014-12-31 17:35:41 +01:00
Arun Agrawal
4de18d0ead Update copyright notices to 2015 [ci skip] 2014-12-31 08:34:14 +01:00
Rafael Mendonça França
ecb1981bfd Template lookup now respect default locale and I18n fallbacks.
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.
2014-12-29 23:48:35 -03:00
claudiob
d3b098b828 Require Ruby 2.2 for Rails 5.0
Stems from [this comment](https://github.com/rails/rails/pull/18203#issuecomment-68138096) by @robin850
and by the blog post http://weblog.rubyonrails.org/2014/12/19/Rails-4-2-final
2014-12-26 13:53:09 +01:00
Yves Senn
ced687fe71 Merge pull request #18163 from y-yagi/fix_nodoc_typo
fix typo in nodoc [ci skip]
2014-12-23 08:42:51 +01:00
yuuji.yaginuma
2a110fcfc8 fix typo in nodoc 2014-12-23 16:03:17 +09:00
Rafael Mendonça França
c8284c8025 Merge pull request #17896 from GBH/globbing_route_mailer_preview
fixing mailer previews for apps with globbing route
2014-12-08 15:10:47 -02:00
Rafael Mendonça França
da13b9aedc Merge pull request #17797 from y-yagi/donot_delete_mailer_layouts
Don't remove mailer layouts files
2014-12-04 18:29:50 -02:00
Oleg
ccc3ddb776 fixing mailer previews for apps with globbing route 2014-12-03 10:43:12 -05:00
Sven Pachnit
e1408971b8 Fix documentation for #default
Just a little syntax error I spotted by accident. Cannot pass hash with curly braces without normal parentheses.
2014-12-01 19:26:50 +01:00
yuuji.yaginuma
c15d3fb0da [ci skip] fix description of url_for 2014-11-30 10:18:07 +09:00
Erik Michaels-Ober
d1374f99bf Pass symbol as an argument instead of a block 2014-11-29 11:53:24 +01:00
claudiob
96d0f751f9 Bump required Ruby version to 2.1.0
[This article](http://weblog.rubyonrails.org/2014/8/20/Rails-4-2-beta1/#maintenance-consequences-and-rails-5-0) states that:

> Rails 5.0 is in most likelihood going to target Ruby 2.2.

Before the exact minimum version is fully decided, @arthurnn [suggests](https://github.com/rails/rails/pull/17830#issuecomment-64940383)
that **at least** version 2.1.0 **must** be required by the `gemspec` files.
2014-11-28 22:59:51 -08:00
Rafael Mendonça França
f25ad07f5a Start Rails 5 development 🎉
We will support only Ruby >= 2.1.

But right now we don't accept pull requests with syntax changes to drop
support to Ruby 1.9.
2014-11-28 15:00:06 -02:00
Jon Atack
d21d8f903d Follow-up to e2cce6c
[skip ci]
2014-11-27 17:46:56 +01:00
Zachary Scott
e2a01aef42 Fix CHANGELOG typo introduced in e2cce6cd [ci skip] 2014-11-27 08:43:37 -08:00
Jon Atack
e2cce6cd41 Action Mailer change log pass
[skip ci]
2014-11-27 17:36:15 +01:00
yuuji.yaginuma
f9411b464d Don't remove mailer layouts files 2014-11-27 14:36:10 +09:00
Rafael Mendonça França
e3f7817cec Use released rails-dom-testing 2014-11-25 19:43:36 -02:00
Xavier Noria
79eedb346e let the AM test suite pass in 1.9 2014-11-24 22:03:54 -08:00
Guo Xiang Tan
ec49324bd7 Update docs to reflect changes to MailerGenerator. 2014-11-25 09:56:49 +08:00
Guo Xiang Tan
cd902a0d1d Add missing CHANGELOG entry. 2014-11-25 09:28:16 +08:00
David Heinemeier Hansson
35362fc226 Merge pull request #17646 from andyjeffries/html_layout_fix
Creating mailer layouts by default, including html and body tags
2014-11-25 01:59:43 +03:00
Xavier Noria
9685080a76 let mailer templates generate URLs by default [Xavier Noria, Richard Schneeman] 2014-11-24 14:33:50 -08:00
Andy Jeffries
a58da25d90 Removing unnecessary File.join calls 2014-11-24 09:37:49 +00:00
Andy Jeffries
38cfaa8285 Creates an ApplicationMailer and layout by default, including html and body tags to reduce spam score 2014-11-21 16:46:49 +00:00
Robin Dupret
1d6d0cc245 Tiny documentation styling fixes [ci skip] 2014-11-02 12:32:50 +01:00
Vipul A M
d3e410070d - Changed redundant user of deliver to deliver_now
- Wrapped text in setting defaults section. Also added break, to a sentence.
[ci skip]
2014-11-01 01:08:31 +05:30
Godfrey Chan
4daebedcc4 Prepare for 4.2.0.beta4 release 2014-10-30 14:12:24 -07:00
Xavier Noria
e595d91ac2 edit pass over all warnings
This patch uniformizes warning messages. I used the most common style
already present in the code base:

* Capitalize the first word.

* End the message with a full stop.

* "Rails 5" instead of "Rails 5.0".

* Backticks for method names and inline code.

Also, converted a few long strings into the new heredoc convention.
2014-10-28 17:47:32 -07:00
Xavier Noria
b3bfa361c5 let's warn with heredocs
The current style for warning messages without newlines uses
concatenation of string literals with manual trailing spaces
where needed.

Heredocs have better readability, and with `squish` we can still
produce a single line.

This is a similar use case to the one that motivated defining
`strip_heredoc`, heredocs are super clean.
2014-10-28 16:35:24 -07:00
Rishi Jain
747a1c9b28 Making the actionmailer docs more explicit to understand [ci skip] 2014-10-26 10:09:22 -07:00
yuuji.yaginuma
7bb678bb7c [ci skip] add :queue option to deliver_later and deliver_later! documentation 2014-10-19 09:35:00 +09:00
Zachary Scott
e994fa11cf [ci skip] Fix word wrap, capitalization, and spacing of text from #17284 2014-10-18 13:14:00 -07:00
Nicolas Cavigneaux
642794a3f2 [ci skip] Add a note about headers overwriting
Since some headers can appear multiple times in an email it's required
to set it to nil first when you want to overwrite an existing one.

This commit add some information about this process.

Fix #15912
2014-10-18 13:01:20 -07:00
Rafael Mendonça França
be5521eb4e Use released rails-dom-testing 2014-10-16 16:53:46 -03:00
Yves Senn
400b0818fa some changelog formatting. [ci skip] 2014-10-16 09:11:41 +02:00
Rafael Mendonça França
0bd1a4e05c Only include the needed assertions 2014-10-07 20:01:40 -03:00
schneems
e6b0b760cc fix tests on action_mailer
Include appropriate helpers and use `assert_dom_equal` where applicable
2014-10-07 17:40:59 -05:00
Robin Dupret
1fac7b79f3 Follow up to #16613
Since we want this flag to be enabled anytime we are running the tests
under JRuby, let's enable this at the Rakefile level so people get the
performance boost on their local checkout.

Moreover, we avoid having to update this particular line anytime the
option changes on the JRuby side.

The only drawback is that we have to define it in every Rakefile but
there's no big deal, this is already the case for other options.
2014-09-28 12:04:06 +02:00
Rafael Mendonça França
4581d04477 Preparing for 4.2.0.beta2 release 2014-09-26 17:19:53 -03:00