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

Use try instead of checking for GlobalID::Identification

This commit is contained in:
Ari Pollak 2014-12-04 16:51:59 -05:00
parent 25c8ea264e
commit e5e44ba8db

View file

@ -85,11 +85,7 @@ module ActiveJob
end
def global_id_or_inspected(argument)
if argument.is_a?(GlobalID::Identification)
argument.to_global_id.to_s
else
argument.inspect
end
argument.try(:to_global_id).try(:to_s) || argument.inspect
end
def args_info(job)