I have the following code in my HTML where I am trying to pass a Ruby variable to the JavaScript function. Can someone please help me with the syntax?
<% @level2.each_with_index do |row2, index2| %>
................................................
................................................
<a href="javascript:validateUser_com("<%= #{index2} %>")" >Edit</a>