Reputation: 45
I am trying to create my image as a block, but it's not working ... The app doesn't read the code inside the block :
<%= image_tag("house-toiture.jpg") do %>
<%= puts "COME ON DUDE" %>
<% end %>
I want to add the following information inside :
<% @operation_presenter.works.each do |work| %>
<!-- (<%= work.travaux %>) -->
<button type="button" data-container="body" data-toggle="popover" data-trigger="hover" data-placement="top" data-html="true" title="<%= work.nom_travaux %>" data-content="travaux : <%= work.travaux %><br />
Cout travaux : <%= work.cout_travaux %>€<br />
TVA : <%= work.tva_travaux %>%"><%= work.nom_travaux %></button>
<% end %>
The idea is to add popover on the image.
Someone has an idea where comes from the issue ?
Thank you very much !
Upvotes: 0
Views: 413
Reputation: 39383
HTML <img>
tags cannot have children, so this doesn't make sense.
To add popups, you need some JavaScript (or very nifty CSS with hidden checkboxes). If you don't want to write that yourself, use something like Bootstrap popups.
Upvotes: 1