title: Disconnect and unsubscribe Action Cable on Rails 6
body: <p>This was already asked here, but it seems that the old methods (<a href="https://stackoverflow.com/questions/40495351/how-to-close-connection-in-action-cable">example</a> and <a href="https://stackoverflow.com/questions/37765963/detect-unsubscribe-from-action-cable-on-page-change">example</a>) no longer work on Rails 6 because you cannot use <code>App.channel</code> inside your <code>app/javascript/channels/your_channel.js</code>.
  Though, correct me if I'm wrong because I'm new to Rails.</p>
  
  <p>My question is: how to disconnect or/and unsubscribe from client side on Rails 6?</p>
  
  <p>I'm especially interested in the "on page change" scenario.</p>