I'm using the following code..
$(document).ready(function(){
$("#test a").click(function(){
var labelTo = $(this).text();
window.location = '#{root_path(labelTo)}';
});
});
I just want to send the value labelTo in root_path..but its giving following error
undefined local variable or method `labelTo' for #
any solution??