intercom / intercom-rails

The easiest way to install Intercom in a Rails app.
https://developers.intercom.io/reference
MIT License
280 stars 106 forks source link

add hide_intercom_messenger_for_request #230

Closed mmartinic closed 5 years ago

attenzione commented 8 years ago

this can be done through skip_after_action :intercom_rails_auto_include, only: [:show]

jfeust commented 7 years ago

@attenzione That doesn't seem to work with turbolinks 5 enabled. If you load a page without the skip_after_action, the JS stays loaded on the page you're trying to do the skip_after_action. I'm not sure this PR is the right answer, but we're also having trouble with turbolinks and supressing the intercom messenger on certain actions.

jfeust commented 7 years ago

Update, I'm now doing this by setting a custom data attribute in the controller actions where I want to hide it: intercom_custom_data.user[:hide_default_launcher] = true

eoin commented 5 years ago

Closing in favor of using skip_after_action.