ahoy
ahoy copied to clipboard
Fix `NoMethodError` when no request and `cookies == :none`
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
.