I have a Bootstrap popover working in a Rails form:
<%= f.input :r_desc, :label => 'Description', :input_html => {:rows => '10', :class => "span8", "data-content" => 'Uses Textile styling', "data-title" => 'TEXTILE'} %>
That uses the :input_html to place the popover contents.
But, how do I write one into a Rails index line?
<td><%= screencast.desc %></td>
I’d like to add this to the screencast.desc:
rel="popover" data-content="<%= screencast.desc %>" data-original-title="Description">
But, I’m not sure how to place that code into the screencast.desc display code.
Thanks!
Update —–
This works – but, it’s not exactly what I want. It turns the data field into a button.
<td><a href="#" class="btn btn-large" rel="popover" data-content="<%= screencast.desc %>" data-original-title="Description"><%= screencast.title %></a></td>
Update 2 —- THIS WORKS!
<td><a rel="popover" data-content="<%= screencast.desc %>" data-original-title="Description"><%= screencast.title %></a></td>
This works: