aboutsummaryrefslogtreecommitdiffstats
path: root/guides/source/4_2_release_notes.md
diff options
context:
space:
mode:
authorXavier Noria <fxn@hashref.com>2014-11-27 22:17:30 +0100
committerXavier Noria <fxn@hashref.com>2014-11-27 22:18:49 +0100
commit8fb239633108210506241c4aa45827b63c20d97f (patch)
treeafbed00c97b0dc252db4e4c9a69b95ca6862e9f6 /guides/source/4_2_release_notes.md
parent5ac824ecb7bf20f332cbb1c50ab7d9185c124f8c (diff)
downloadrails-8fb239633108210506241c4aa45827b63c20d97f.tar.gz
rails-8fb239633108210506241c4aa45827b63c20d97f.tar.bz2
rails-8fb239633108210506241c4aa45827b63c20d97f.zip
release notes: iteration over the description of Global ID [ci skip]
Diffstat (limited to 'guides/source/4_2_release_notes.md')
-rw-r--r--guides/source/4_2_release_notes.md18
1 files changed, 14 insertions, 4 deletions
diff --git a/guides/source/4_2_release_notes.md b/guides/source/4_2_release_notes.md
index c3803aa856..01981e5741 100644
--- a/guides/source/4_2_release_notes.md
+++ b/guides/source/4_2_release_notes.md
@@ -41,13 +41,23 @@ 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.
-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
+Jobs often need to take Active Record objects as arguments. 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.
+Record objects as job arguments just works by using Global ID internally.
+
+For example, if `trashable` is an AR this job runs just fine
+
+```ruby
+class TrashableCleanupJob < ActiveJob::Base
+ def perform(trashable, depth)
+ trashable.cleanup(depth)
+ end
+end
+```
+
+with no serialization involved.
See the [Active Job Basics](active_job_basics.html) guide for more
information.