Rails image_tag does not close image tag
In a rails project, I use image_tag to create html image elements.
<%= image_tag("test.jpg", :alt => "test image") %>
gives rise to
<img src="test.jpg" alt="test image">
This happens throughout my rails project.
Is there any parameter that someone else has set that causes this? How can I make rails always close the image tag?
+3
1 answer
image_tag ActionView:: Helpers:: TagHelper.tag, , , ( XHTML). , - true. .
tag(:img, { :src => "test.jpg" }, false)
.
:img "img". :img symbol, , . , "img" , tag, .
+6