Forum: Ruby on Rails Render js.erb after page load

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
48c1402b87ff63718ba21a446fe455ef?d=identicon&s=25 Alessio V. (alessio_v)
on 2017-02-06 21:53
Hi, I have a remote link that I use to recover a js.erb file that report
the list of people. In this js.erb file I have

<% @html=""
@people.each do |person|
   @html+= "<tr>"
   @html+="<td>"+person.name+" "+person.lname+"</td>"
   @html+="</tr>"
end %>

$("div").append(@html)

There is the possibility to call the js.erb file when the page load? I
can make an ajax call but there is the possibility to use a function of
rails jquery uijs where I pass my link?
This topic is locked and can not be replied to.