I have below piece of code in results.js.erb
of Rails application where I need to render the partial URL dynamically using the string interpolation concept. I was unable to interpolate selector
value dynamically in the render. Any help in resolving this issue is much appreciated. Thanks in advance.
var selector = = 'rc' // possible values rc,mc.vc....
$("div.enroll-item div." + selector + "-item").empty().html('<%= j render "test/health_check/#{selector}_check", text_helper: text_helper %>');