javascript - How do I write a jquery js.erb to have both html and ruby output for a link_to :remote => in rails 3? -
i have following in js.erb file, doesn't execute ruby code:
4 //update number of followers 5 $('.follow-count').html("#{@followers_count} following")
what's right way mix both ruby (and access things controller) , regular text?
js.erb
files work html.erb
files. need use <%= %>
tags instead:
$('.follow-count').html("<%= @followers_count %> following")
Comments
Post a Comment