I have this code:
div class: item.ui_type do
link_to image_tag(item.image.image_public_url), item.target)
link_to item.label, item.target
end
Basically, I want a div with 2 links inside. However, only the last element is getting rendered, presumably because what gets rendered inside the body is the return value of the block.
I know I can declare those as an array and join them, but then I need to call html_safe. I'm trying to find a way to do this when you actually don't trust the input that you're receiving.
This seems like it should be an extremely simple thing to do, but I can't find it anywhere.
Any pointers?
Here's what I did to add two links inside the
div
Behind it does is first, create the link tag in strings inside an array, second, you join these strings and make it html_safe so div can accept it.