link_toメソッドで生成されたリンクの本文に埋め込みHTMLを取得するための最良の方法は何ですか?
私は基本的に次のものが欲しいです:
<a href="##">This is a <strong>link</strong></a>
Railsと<span>タグで提案されているように、私はこれに取り組んでいますが、運がありません。私のコードは次のようになります。
item_helper.rb
def picture_filter
#...Some other code up here
text = "Show items with " + content_tag(:strong, 'pictures')
link_to text, {:pics => true}, :class => 'highlight'
end
item_view.html.erb
#...
<%=raw picture_filter %>
#...