lib/intercom-rails/shutdown_helper.rb in intercom-rails-0.3.5 vs lib/intercom-rails/shutdown_helper.rb in intercom-rails-0.3.8
- old
+ new
@@ -1,9 +1,8 @@
module IntercomRails
module ShutdownHelper
# This helper allows to erase cookies when a user log out of an application
# It is recommanded to call this function every time a user log out of your application
- # specifically if you use both "Acquire" and another Intercom product
# Do not use before a redirect_to because it will not clear the cookies on a redirection
def self.intercom_shutdown_helper(cookies)
if (cookies.is_a?(ActionDispatch::Cookies::CookieJar))
cookies["intercom-session-#{IntercomRails.config.app_id}"] = { value: nil, expires: 1.day.ago}
else