drallewellyn
drallewellyn

Reputation: 35

How to change an html external link with tooltips into link_to in rails

Apologies I am a noob to all this, I think I have searched for my question but can't find a solution. Anyway, I have the following line of code from a purchased theme:

<a href="#" class="header-btn header-btn-sm" data-hover="tooltip" data-placement="left" title="link me on linkedin"> <i class="fa fa-linkedin header-icon"></i> </a>

I want to turn it into a rails link_to, I can handle the class aspect, but not sure how to keep the icon and manage the tooltip js?

Thanks

Upvotes: 2

Views: 103

Answers (1)

csi
csi

Reputation: 9338

<%= link_to("#", {"data-hover" => "tooltip"}) do %>  
  <i class="fa fa-linkedin header-icon"></i>  
<% end %>  

Read more about link_to

Upvotes: 2

Related Questions