intercom-rails
intercom-rails copied to clipboard
Path generation occasionally creates relative and throws an error
Version info
- intercom-rails version: 0.3.5
- Rails version: 5.1.5
Expected behavior
Intercom should create a header that loads a javascript file from the root
Actual behavior
Intermittently, the gem renders a path such as this:
https://www.patchvault.org/lodges/168b-kuskitannee/issue_sets/intercom.js
and the error (as it's trying to look up a record with that :id)
ActiveRecord::RecordNotFound: Couldn't find IssueSet with 'id'=intercom app/controllers/issue_sets_controller.rb:13:in `show'
When it renders correctly, the head
contains:
<script type="text/javascript" async="" src="https://widget.intercom.io/widget/bni1h8ib"></script>
Steps to reproduce
- Install the gem
- Run it on an app with polymorphic nested routes
- wait for it to fail
Logs
Have AppSignal captures on this, but nothing more. If there's something in particular that would help, let me know.