-
Notifications
You must be signed in to change notification settings - Fork 377
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix NoMethodError when cookies == :none
When tracking with no visit, ``` 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 not calling visitor_anonymity_set when there is no request.
- Loading branch information
Showing
2 changed files
with
18 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters