We've moved discussions to Discord

Switching Accounts - data-action: "ajax:success->accounts#reconnect" does not get triggered

Feti Jashari
Team,

Not sure if you run into this, but after upgrading to latest version of Jumpstart, data-action: "ajax:success->accounts#reconnect" does not get triggered when user switches the account, therefore the user / and cable remains with the old user.

I actually solved it by adding data: {  turbo: false }, removed the controller: :accounts from the link on all switch to account links. Tested and everything works again !

:) Stay Safe ! 

Donal O Duibhir
Any idea how to reconnect ActionCable if you are remote linking to the app with a parameter ?account_id=X as you can't put  data: { controller: :accounts, action: "ajax:success->accounts#reconnect" } in a mailer view link  Chris Oliver  ? Context is email reports where I need to link to specific accounts... they may be logged in but might have Y accounts/access and will not be clicking the link from inside the app but rather from a remote URL in an email from the report... and I need to get them into the right account/dashboard?
Donal O Duibhir
Actually, this seems to work fine when looking at the logs... using app/controllers/concerns/set_current_request_details.rb and set_current_tenant from app/channels/application_cable/connection.rb #bravo
Notifications
You’re not receiving notifications from this thread.