My original intention was to display some text on the image. At the same time, when we click the images, the webpage will be redirected. And I use link_to function with div containing background image. The code is like this:
<%= link_to raw('<div style="background-image:url(<%= image_url '1.jpg'%>);width:340px;"> This is a test</div>'),index_by_dvp_domain_path %>
But the system tells me there is SyntaxError.