1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

[Active Job] Try to deserialize with GlobalID only strings and globalids

This commit is contained in:
Cristian Bica 2014-09-03 15:06:10 +03:00
parent e2ce4c7aa3
commit 57d56aa933

View file

@ -56,8 +56,10 @@ module ActiveJob
argument.map { |arg| deserialize_argument(arg) } argument.map { |arg| deserialize_argument(arg) }
when Hash when Hash
Hash[ argument.map { |key, value| [ key, deserialize_argument(value) ] } ].with_indifferent_access Hash[ argument.map { |key, value| [ key, deserialize_argument(value) ] } ].with_indifferent_access
else when String, GlobalID
GlobalID::Locator.locate(argument) || argument GlobalID::Locator.locate(argument) || argument
else
argument
end end
end end