From 2f7b239fca6630e49ba8ad9df6fc7db25e1080f0 Mon Sep 17 00:00:00 2001 From: Abdelkader Boudih Date: Sun, 17 Aug 2014 01:06:30 +0000 Subject: [ActiveJob] Use globalid gem --- activejob/lib/active_job/arguments.rb | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'activejob/lib/active_job/arguments.rb') 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 -- cgit v1.2.3