0

I want to send message to ActionCable server on a page load... But ActionCable not connected at that time. How to delay message sending until ActionCable will connect to server?

Brazhnyk Yuriy
  • 464
  • 4
  • 10

1 Answers1

0

Defining callback for turbolinks:load inside connected: function will give you what you want

Jeremy
  • 725
  • 6
  • 11
  • I guess i'm not described my problem correctly. I have turbolinks, so actioncable connects once per opened page, but multiple pages loads through turbolinks. I guess defining callback for `turbolinks:load` inside connected: function will give me what i want. Please change your answer so i can accept it. – Brazhnyk Yuriy Feb 22 '17 at 07:31