Modified js to index.html.erb