aboutsummaryrefslogtreecommitdiffstats
path: root/activejob/lib/active_job/arguments.rb
diff options
context:
space:
mode:
authorAbdelkader Boudih <terminale@gmail.com>2014-08-17 01:06:30 +0000
committerAbdelkader Boudih <terminale@gmail.com>2014-08-17 23:10:45 +0000
commit2f7b239fca6630e49ba8ad9df6fc7db25e1080f0 (patch)
tree3de16393c2c3ff4fcf1534c28e700b937a3c05b6 /activejob/lib/active_job/arguments.rb
parent59221cc4f1b8f87553455aad26905c4f28b424f8 (diff)
downloadrails-2f7b239fca6630e49ba8ad9df6fc7db25e1080f0.tar.gz
rails-2f7b239fca6630e49ba8ad9df6fc7db25e1080f0.tar.bz2
rails-2f7b239fca6630e49ba8ad9df6fc7db25e1080f0.zip
[ActiveJob] Use globalid gem
Diffstat (limited to 'activejob/lib/active_job/arguments.rb')
-rw-r--r--activejob/lib/active_job/arguments.rb7
1 files changed, 2 insertions, 5 deletions
diff --git a/activejob/lib/active_job/arguments.rb b/activejob/lib/active_job/arguments.rb
index 8486a9e918..b7572b0e29 100644
--- a/activejob/lib/active_job/arguments.rb
+++ b/activejob/lib/active_job/arguments.rb
@@ -1,6 +1,3 @@
-require 'active_model/global_locator'
-require 'active_model/global_identification'
-
module ActiveJob
module Arguments
extend self
@@ -17,7 +14,7 @@ module ActiveJob
private
def serialize_argument(argument)
case argument
- when ActiveModel::GlobalIdentification
+ when GlobalID::Identification
argument.global_id.to_s
when *TYPE_WHITELIST
argument
@@ -37,7 +34,7 @@ module ActiveJob
when Hash
Hash[ argument.map { |key, value| [ key, deserialize_argument(value) ] } ].with_indifferent_access
else
- ActiveModel::GlobalLocator.locate(argument) || argument
+ GlobalID::Locator.locate(argument) || argument
end
end