I have the following in my js.erb file, but it doesn’t execute the ruby code:
4 //Update the number of followers
5 $('.follow-count').html("#{@followers_count} following")
What’s the right way to mix both ruby (and access things from the controller) and regular text?
js.erbfiles work just like yourhtml.erbfiles. You need to use<%= %>tags instead: