luwahg
Last Updated: February 25, 2016
·
615
· dperrymorrow
37b092a324da25d53fd63d780692b174

Nested dom nodes inside of link_to helper

so I see alot of this for adding nested html inside of links using Rails link_to helper

= link_to raw("<span>fooo</foo>"), "url"

Just an FYI many rails helpers will take a block.

= link_to "url" do
  %span foo

I much prefer the latter instead of inlining html as a string in the param.

Say Thanks
Respond