Open rgarner opened 7 months ago
When tracking with no request,
Ahoy.cookies = :none Ahoy::Tracker.new.track_event(:would_fail)
would raise NoMethodError: undefined method 'remote_ip' for nil. Since we explicitly don't have a request, allow visitor_token_helper to fall back on generate_id by returning nil from visitor_anonymity_set when there is no request.
NoMethodError: undefined method 'remote_ip' for nil
request
visitor_token_helper
generate_id
nil
visitor_anonymity_set
When tracking with no request,
would raise
NoMethodError: undefined method 'remote_ip' for nil
. Since we explicitly don't have arequest
, allowvisitor_token_helper
to fall back ongenerate_id
by returningnil
fromvisitor_anonymity_set
when there is norequest
.