Use try instead of respond_to?

parent f6c44478
......@@ -26,9 +26,7 @@ module Geo
end
def project_id
return nil unless event.respond_to?(:project_id)
event.project_id
event.try(:project_id)
end
end
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment