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:
parent
25c8ea264e
commit
e5e44ba8db
1 changed files with 1 additions and 5 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue