Update ensure_uuid method in Ahoy initializer
It's possible to use the `Ahoy::Tracker::UUID_NAMESPACE` since Ahoy 2.1.0 [1]. [1] https://github.com/ankane/ahoy/commit/44f7956bad
This commit is contained in:
@@ -24,12 +24,10 @@ class Ahoy::Store < Ahoy::DatabaseStore
|
||||
Visit
|
||||
end
|
||||
|
||||
UUID_NAMESPACE = UUIDTools::UUID.parse("a82ae811-5011-45ab-a728-569df7499c5f")
|
||||
|
||||
def ensure_uuid(id)
|
||||
UUIDTools::UUID.parse(id).to_s
|
||||
rescue
|
||||
UUIDTools::UUID.sha1_create(UUID_NAMESPACE, id).to_s
|
||||
UUIDTools::UUID.sha1_create(UUIDTools::UUID.parse(Ahoy::Tracker::UUID_NAMESPACE), id).to_s
|
||||
end
|
||||
|
||||
def exclude?
|
||||
|
||||
Reference in New Issue
Block a user