All threads / How do I change the actioncable default path?

Ask A Question

Notifications

You’re not receiving notifications from this thread.

How do I change the actioncable default path?

Marcus S asked in Rails

Hi there,

I have an ecommerce website that sells cables, and as such I'd like to use /cable, /cables etc in my base routes.
Unfortunately activecable uses the '/cable' path by default. Is there any way I can change this?

So far I've tried changing in my application.rb:

config.action_cable.url = "ws://www.example.com/actioncable"

Any thoughts would be much apprecaited!

Cheers,

Marcus

Join the discussion

Want to stay up-to-date with Ruby on Rails?

Join 37,344+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.

    logo Created with Sketch.

    Ruby on Rails tutorials, guides, and screencasts for web developers learning Ruby, Rails, Javascript, Turbolinks, Stimulus.js, Vue.js, and more. Icons by Icons8

    © 2020 GoRails, LLC. All rights reserved.