Reputation: 1098
Running
ruby 2.2.1p85 (2015-02-26 revision 49769) [x86_64-linux]
and Rails 4.2.5
I'm trying to added bootstrap tooklips into a ruby tag <%= link_to '', account, class: "fa fa-eye" %>
but it doesn't seem to work.
The syntax I used was
<%= link_to '', account, class: "fa fa-eye" data-toggle="tooltip" data-placement="top" title="Tooltip on top">Tooltip on top %>
I placed the sample code from the bootstrap site
<button type="button" class="btn btn-default" data-toggle="tooltip" data-placement="top" title="Tooltip on top">Tooltip on top</button>
just to make sure that the js was working correctly and it seem to be fine. I want to avoid installing bootstrap-tooltip-rails Gem or any other gem for that matter. Not sure what I'm missing.
Upvotes: 1
Views: 2037
Reputation: 1098
Solution to adding bootstrap tooltips in Rails App
<td><%= link_to ' Edit', edit_account_path(account), class: "fa fa-pencil-square-o", 'data-toggle': 'tooltip', 'data-placement':'top', title: 'Edit Client Account' %></td>
Upvotes: 1