Sha256: fda8a2d81df74054d6254ffa8d1aa06f486189f059d36adeced6412733869bc6

Contents?: true

Size: 544 Bytes

Versions: 1

Compression:

Stored size: 544 Bytes

Contents

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 (controller)
      controller.response.delete_cookie("intercom-session-#{IntercomRails.config.app_id}")
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
intercom-rails-0.2.33 lib/intercom-rails/shutdown_helper.rb