Last Updated: February 25, 2016
·
1.884K
· sameera207

adding a link_to helper to an id in the same page

When we need to have a hyper link to an id in the same page

given that your html id is #my_id

<%= link_to('Click here to do to my_id', :anchor => 'my_id') %>
<div id="my_id"></div>