Last Updated: February 25, 2016
· dperrymorrow

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.