Commit Graph

794 Commits

Author SHA1 Message Date
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
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
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
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
yuuji.yaginuma
f9411b464d Don't remove mailer layouts files 2014-11-27 14:36:10 +09:00
Guo Xiang Tan
ec49324bd7 Update docs to reflect changes to MailerGenerator. 2014-11-25 09:56:49 +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
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
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
Rafael Mendonça França
4581d04477 Preparing for 4.2.0.beta2 release 2014-09-26 17:19:53 -03:00
Christian Felder (masone)
b37e8482ca Allow attaching files while the mail view is rendered 2014-09-22 15:52:48 +02:00
Cristian Bica
15ddf60e05 Rename remaining :in / :at to :wait / :wait_until 2014-09-04 08:08:06 +03:00
Cristian Bica
1e237b4e44 Active Job refactoring 2014-09-03 23:01:46 +03:00
yuuji.yaginuma
83bf95faac [ci skip] Fix a typo in the doc of MessageDelivery 2014-09-02 17:57:23 +09:00
Robin Dupret
84c0f73c8d Refer to the library name instead of the constant
When we are loading a component and we want to know its version, we are
actually not speaking about the constant but the library itself.

[ci skip]

[Godfrey Chan & Xavier Noria]
2014-08-30 11:58:23 +02:00
David Heinemeier Hansson
7475b43cdb Merge branch 'master' of github.com:rails/rails 2014-08-29 14:54:08 -07:00
Matthew Draper
b47d8dea25 Merge pull request #16598 from seuros/master
[ActionMailer] require activejob railtie
2014-08-23 03:45:47 +09:30
Abdelkader Boudih
39704bb89f [ActionMailer] require activejob railtie 2014-08-22 17:37:36 +00:00
Xavier Noria
b6ccaee952 applies API guidelines to new AM docs 2014-08-21 23:27:25 +02:00
Abdelkader Boudih
6e75e7e3bc [Rdoc] Make clear that we are sending an AR object [ci skip] 2014-08-20 16:41:00 +00:00
Abdelkader Boudih
d1629346b9 Fix typo in rdoc [ci skip] 2014-08-20 16:22:41 +00:00
Cristian Bica
9e7f4a94ca Updated rdoc / guides / release notes related to ActiveJob / ActionMailer 2014-08-20 17:48:34 +03:00
Cristian Bica
f4ee114746 Deprecated .deliver / .deliver! to .deliver_now / .deliver_now! 2014-08-20 17:48:34 +03:00
David Heinemeier Hansson
6a23bf0f4c Preparing for 4.2.0.beta1 release 2014-08-19 19:32:51 -07:00
Lucas Mazza
04db4c2868 Add set_delivery_method and restore_delivery_method to ActionMailer::TestCase.
This way these methods are available outside the ActionMailer test suite, but
they are still duplicated inside `test/abstract_unit` for test cases that don't
inherit from the `ActionMailer::TestCase` class.
2014-08-19 23:26:45 -03:00
Rafael Mendonça França
c78da4d5c4 Merge branch 'master' into loofah
Conflicts:
	actionpack/CHANGELOG.md
2014-08-17 22:38:22 -03:00
Abdelkader Boudih
299d1f2626 [ActionMailer] Rename ActionMailer::DelayedDeliveryJob to ActionMailer::DeliveryJob 2014-08-17 23:10:08 +00:00
Cristian Bica
0e4e496a57 Fixed indentation 2014-08-16 00:30:20 +03:00
Cristian Bica
e034ac33ea Removed method missing from ActionMailer::MessageDelivery 2014-08-15 23:20:55 +03:00
Abdelkader Boudih
18303f6e82 Refactor DeliverLater into MessageDelivery 2014-08-14 11:05:35 +00:00
Abdelkader Boudih
b937ea893e Make ActionMailer::Previews methods class methods. 2014-08-14 10:55:12 +00:00
Abdelkader Boudih
67f8b6b2bc Added ActionMailer::DeliverLater 2014-08-13 11:36:32 +00:00
Rafael Mendonça França
a2400308ea Merge branch 'master' into loofah
Conflicts:
	actionpack/CHANGELOG.md
	actionpack/test/controller/integration_test.rb
	actionview/CHANGELOG.md
2014-08-12 11:10:42 -03:00
@schneems and @sgrif
2bbcca004c Deprecate *_path methods in mailers
Email does not support relative links since there is no implicit host. Therefore all links inside of emails must be fully qualified URLs. All path helpers are now deprecated. When removed, the error will give early indication to developers to use `*_url` methods instead.

Currently if a developer uses a `*_path` helper, their tests and `mail_view` will not catch the mistake. The only way to see the error is by sending emails in production. Preventing sending out emails with non-working path's is the desired end goal of this PR.

Currently path helpers are mixed-in to controllers (the ActionMailer::Base acts as a controller). All `*_url` and `*_path` helpers are made available through the same module. This PR separates this behavior into two modules so we can extend the `*_path` methods to add a Deprecation to them. Once deprecated we can use this same area to raise a NoMethodError and add an informative message directing the developer to use `*_url` instead.

The module with warnings is only mixed in when a controller returns false from the newly added `supports_relative_path?`.

Paired @sgrif & @schneems
2014-07-30 12:01:45 -05:00