I have rails application in content.html.erb, I have this code
I want to assign data-url with cover.image_address which is variable.
this code not work how can use ruby in div html.
<div class="product" data-type="magazine" data-popup="true"
data-url= <% "assets/#{cover.image_address}" %> >
<%= image_tag(cover.image_address,
{:width => "76", :height => "107"}) %>
</div>
You’re missing the missing
=in the asset call. Should be:<%= "assets/#{cover.image_address}" %>