diff options
author | Xavier Noria <fxn@hashref.com> | 2014-11-27 09:18:01 +0100 |
---|---|---|
committer | Xavier Noria <fxn@hashref.com> | 2014-11-27 09:18:01 +0100 |
commit | ec8edeca1d0778998e35a022464ec0f4348bd86e (patch) | |
tree | 252fca49358375d1e3f5ab2e01dc4ea09aafc1f7 | |
parent | b2351beae58b3ff8fe7d94c6d6d2d6794f015c64 (diff) | |
download | rails-ec8edeca1d0778998e35a022464ec0f4348bd86e.tar.gz rails-ec8edeca1d0778998e35a022464ec0f4348bd86e.tar.bz2 rails-ec8edeca1d0778998e35a022464ec0f4348bd86e.zip |
edits in the release notes for 4.2
-rw-r--r-- | guides/source/4_2_release_notes.md | 34 |
1 files changed, 22 insertions, 12 deletions
diff --git a/guides/source/4_2_release_notes.md b/guides/source/4_2_release_notes.md index 330db52e34..329665d859 100644 --- a/guides/source/4_2_release_notes.md +++ b/guides/source/4_2_release_notes.md @@ -3,7 +3,8 @@ Ruby on Rails 4.2 Release Notes Highlights in Rails 4.2: -* Active Job, Action Mailer's `deliver_later` +* Active Job +* Asynchronous Mails * Adequate Record * Web Console * Foreign key support @@ -29,7 +30,7 @@ Rails](upgrading_ruby_on_rails.html#upgrading-from-rails-4-1-to-rails-4-2). Major Features -------------- -### Active Job, Action Mailer's `deliver_later` +### Active Job Active Job is a new framework in Rails 4.2. It is a common interface on top of queuing systems like [Resque](https://github.com/resque/resque), [Delayed @@ -40,20 +41,25 @@ Jobs written with the Active Job API run on any of the supported queues thanks to their respective adapters. Active Job comes pre-configured with an inline runner that executes jobs right away. -Building on top of Active Job, Action Mailer now comes with a `deliver_later` -method that sends the email asynchronously via a job in a queue, so it doesn't -block the controller or model. - -The new [Global ID](https://github.com/rails/globalid) library makes it easy -to pass Active Record objects to jobs. The library stores a global URI that -uniquely represents the model without serializing its state. This means you no -longer have to manually pack and unpack your Active Records by passing ids. -Just give the job the Active Record object, its global ID will be stored, and -then the object transparently loaded for you from it. +Jobs often need to take Active Record objects as arguments, but we can't pass +fully-marshaled Ruby objects through many queueing systems. Active Job passes +object references as URIs (uniform resource identifiers) instead of marshaling +the object itself. The new [Global ID](https://github.com/rails/globalid) +library builds URIs and looks up the objects they reference. Passing Active +Record objects as job arguments "just works:" Active Job passes a reference to +the object, then looks up the object from its reference. See the [Active Job Basics](active_job_basics.html) guide for more information. +### Asynchronous Mails + +Building on top of Active Job, Action Mailer now comes with a `deliver_later` +method that sends emails via the queue, so it doesn't block the controller or +model if the queue is asynchronous (the default inline queue blocks). + +Sending emails right away is still possible with `deliver_now`. + ### Adequate Record Adequate Record is a set of performance improvements in Active Record that makes @@ -554,6 +560,10 @@ Please refer to the [Changelog][action-mailer] for detailed changes. to deliver emails asynchronously. ([Pull Request](https://github.com/rails/rails/pull/16485)) +* Introduced `deliver_now` to send emails right away, without going through + the application's queue. + ([Commit](https://github.com/rails/rails/commit/f4ee114746ddc68db606f63e17e6de28274fc2bd)) + * Added the `show_previews` configuration option for enabling mailer previews outside of the development environment. ([Pull Request](https://github.com/rails/rails/pull/15970)) |