I had a question, re: creating nested html tags in Rails, since I am just learning rails.
Basically, I am trying to refactor some code that looks like this:
<a id="myid" href="/mylink">MainLinkText<span>Subtext</span></a>
However, when I use the contact_tag inside a link_to, I can't get it to display the MainLinkText. My code looks like this:
link_to content_tag(:span, "Subtext"), mylink_path, :id => "myid"
But I don't know how to get the "MainLinkText" in there. Is there a clean way of doing this?
Thanks in advance