Infinity Loop in background in html.erb - how?

How to make infinity loop in background?
In my application.html.erb i want to make this endless:(get_dialogs and
the
subscribe_to)

<% user.get_dialogs do |dialog| %>
<%= subscribe_to “/dialogs/#{dialog[:id]}” %>
<% end %>

Of`course, on client side i am using setInterval , but on server side

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs