actmd / abraham

Trackable application tours for Rails with i18n support
MIT License
124 stars 45 forks source link

How to restart tour for user? (issue with deleting cookie) #65

Closed mchavarriagam closed 2 years ago

mchavarriagam commented 2 years ago

Hi,

I'm trying to add a "reset" button to my site that would effectively restart the tour after the user has either clicked "later" or fully completed the tour. I tried deleting the abraham_histories entries with the creator_id and also tried to do Cookie.remove(COOKIE_KEY) but that's not working; I can still see the cookie with Cookie.get(). It only works if I delete the cookies through the browser, but not via JS, which makes me think I'm on the right track but missing something.

I tried Cookie.remove(COOKIE_KEY) as well as Cookie.remove(COOKIE_KEY, {path: PATH}) with different path combinations. Nothing worked. Any ideas?

mchavarriagam commented 2 years ago

Nevermind, I was missing the domain option. My bad.