aboutsummaryrefslogtreecommitdiffstats
path: root/actionmailer
diff options
context:
space:
mode:
Diffstat (limited to 'actionmailer')
-rw-r--r--actionmailer/CHANGELOG.md64
-rw-r--r--actionmailer/actionmailer.gemspec2
-rw-r--r--actionmailer/lib/action_mailer/base.rb11
-rw-r--r--actionmailer/lib/action_mailer/gem_version.rb6
4 files changed, 8 insertions, 75 deletions
diff --git a/actionmailer/CHANGELOG.md b/actionmailer/CHANGELOG.md
index c8b969c59a..88b0962e8c 100644
--- a/actionmailer/CHANGELOG.md
+++ b/actionmailer/CHANGELOG.md
@@ -1,63 +1 @@
-* `MailerGenerator` now generates layouts by default. The HTML mailer layout
- now includes `<html>` and `<body>` tags which improve the spam rating in
- some spam detection engines. Mailers now inherit from `ApplicationMailer`
- which sets the default layout.
-
- *Andy Jeffries*
-
-* `link_to` and `url_for` now generate URLs by default in templates.
- Passing `only_path: false` is no longer needed.
-
- Fixes #16497 and #16589.
-
- *Xavier Noria*, *Richard Schneeman*
-
-* Attachments can now be added while rendering the mail template.
-
- Fixes #16974.
-
- *Christian Felder*
-
-* Add `#deliver_later` and `#deliver_now` methods and deprecate `#deliver` in
- favor of `#deliver_now`. `#deliver_later` will enqueue a job to render and
- deliver the mail instead of delivering it immediately. The job is enqueued
- using the new Active Job framework in Rails and will use the queue that you
- have configured in Rails.
-
- *DHH*, *Abdelkader Boudih*, *Cristian Bica*
-
-* `ActionMailer::Previews` are now class methods instead of instance methods.
-
- *Cristian Bica*
-
-* Deprecate `*_path` helpers in email views. They generated broken links in
- email views and were not the intention of most developers. The `*_url`
- helper is recommended instead.
-
- *Richard Schneeman*
-
-* Raise an exception when attachments are added after `mail` is called.
- This is a safeguard to prevent invalid emails.
-
- Fixes #16163.
-
- *Yves Senn*
-
-* Add `config.action_mailer.show_previews` configuration option.
-
- This configuration option can be used to enable the mail preview in
- environments other than development (such as staging).
-
- Defaults to `true` in development and `false` elsewhere.
-
- *Leonard Garvey*
-
-* Allow preview interceptors to be registered through
- `config.action_mailer.preview_interceptors`.
-
- See #15739.
-
- *Yves Senn*
-
-Please check [4-1-stable](https://github.com/rails/rails/blob/4-1-stable/actionmailer/CHANGELOG.md)
-for previous changes.
+Please check [4-2-stable](https://github.com/rails/rails/blob/4-2-stable/actionmailer/CHANGELOG.md) for previous changes.
diff --git a/actionmailer/actionmailer.gemspec b/actionmailer/actionmailer.gemspec
index b63f4e5c08..f3bddd8382 100644
--- a/actionmailer/actionmailer.gemspec
+++ b/actionmailer/actionmailer.gemspec
@@ -7,7 +7,7 @@ Gem::Specification.new do |s|
s.summary = 'Email composition, delivery, and receiving framework (part of Rails).'
s.description = 'Email on Rails. Compose, deliver, receive, and test emails using the familiar controller/view pattern. First-class support for multipart email and attachments.'
- s.required_ruby_version = '>= 1.9.3'
+ s.required_ruby_version = '>= 2.1.0'
s.license = 'MIT'
diff --git a/actionmailer/lib/action_mailer/base.rb b/actionmailer/lib/action_mailer/base.rb
index 23139bcbe8..021a758940 100644
--- a/actionmailer/lib/action_mailer/base.rb
+++ b/actionmailer/lib/action_mailer/base.rb
@@ -132,11 +132,6 @@ module ActionMailer
#
# config.action_mailer.default_url_options = { host: "example.com" }
#
- # When you decide to set a default <tt>:host</tt> for your mailers, then you need to make sure to use the
- # <tt>only_path: false</tt> option when using <tt>url_for</tt>. Since the <tt>url_for</tt> view helper
- # will generate relative URLs by default when a <tt>:host</tt> option isn't explicitly provided, passing
- # <tt>only_path: false</tt> will ensure that absolute URLs are generated.
- #
# = Sending mail
#
# Once a mailer action and template are defined, you can deliver your message or create it and save it
@@ -498,7 +493,7 @@ module ActionMailer
# Sets the defaults through app configuration:
#
- # config.action_mailer.default { from: "no-reply@example.org" }
+ # config.action_mailer.default(from: "no-reply@example.org")
#
# Aliased by ::default_options=
def default(value = nil)
@@ -859,7 +854,7 @@ module ActionMailer
when user_content_type.present?
user_content_type
when m.has_attachments?
- if m.attachments.detect { |a| a.inline? }
+ if m.attachments.detect(&:inline?)
["multipart", "related", params]
else
["multipart", "mixed", params]
@@ -914,7 +909,7 @@ module ActionMailer
if templates.empty?
raise ActionView::MissingTemplate.new(paths, name, paths, false, 'mailer')
else
- templates.uniq { |t| t.formats }.each(&block)
+ templates.uniq(&:formats).each(&block)
end
end
diff --git a/actionmailer/lib/action_mailer/gem_version.rb b/actionmailer/lib/action_mailer/gem_version.rb
index e568b8f6f2..ac79788cf0 100644
--- a/actionmailer/lib/action_mailer/gem_version.rb
+++ b/actionmailer/lib/action_mailer/gem_version.rb
@@ -5,10 +5,10 @@ module ActionMailer
end
module VERSION
- MAJOR = 4
- MINOR = 2
+ MAJOR = 5
+ MINOR = 0
TINY = 0
- PRE = "beta4"
+ PRE = "alpha"
STRING = [MAJOR, MINOR, TINY, PRE].compact.join(".")
end