diff options
author | mo khan <mo@mokhan.ca> | 2014-09-26 11:10:06 -0600 |
---|---|---|
committer | mo khan <mo@mokhan.ca> | 2014-10-02 10:57:30 -0600 |
commit | bc6421c9eff09fee31d4947d2cc6ddc580314de0 (patch) | |
tree | b60143567122b7b368886baa916df38d1a23da10 /activejob/lib/active_job/arguments.rb | |
parent | 7b740f31cc6f88fe20a51eb7da1468082e6fdb5a (diff) | |
download | rails-bc6421c9eff09fee31d4947d2cc6ddc580314de0.tar.gz rails-bc6421c9eff09fee31d4947d2cc6ddc580314de0.tar.bz2 rails-bc6421c9eff09fee31d4947d2cc6ddc580314de0.zip |
Add documentation on Active Job.
This adds documentation for the Active Job API. It includes
documentation on how to configure the queue_adapter, and how to create
new jobs. It adds links to the various other sections of the Active Job
documentation.
Diffstat (limited to 'activejob/lib/active_job/arguments.rb')
-rw-r--r-- | activejob/lib/active_job/arguments.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/activejob/lib/active_job/arguments.rb b/activejob/lib/active_job/arguments.rb index 86b85ebdba..e2c076eb3f 100644 --- a/activejob/lib/active_job/arguments.rb +++ b/activejob/lib/active_job/arguments.rb @@ -24,10 +24,16 @@ module ActiveJob extend self TYPE_WHITELIST = [ NilClass, Fixnum, Float, String, TrueClass, FalseClass, Bignum ] + # Serializes a set of arguments. Whitelisted types are returned + # as-is. Arrays/Hashes are serialized element by element. + # All other types are serialized using GlobalID. def serialize(arguments) arguments.map { |argument| serialize_argument(argument) } end + # Deserializes a set of arguments. Whitelisted types are returned + # as-is. Arrays/Hashes are deserialized element by element. + # All other types are deserialized using GlobalID. def deserialize(arguments) arguments.map { |argument| deserialize_argument(argument) } rescue => e |