开发者

How do I specify a span tag as the 'Name' of the link, in the link_to helper in Rails 3?

So my link_to looks like:

<%= link_to compare_stage_path(stage, :access_key => client.authentication_token) %>

But I would like to make the following span the link that links to the above path:

<span class='edit-icon'> </span>

How do I do开发者_如何学Python that ?


If I understand correctly, you want that span tag as the content of the anchor element for the link, right? In that case...

<%= link_to "<span class='edit-icon'> </span>".html_safe,
            compare_stage_path(stage, :access_key => client.authentication_token) %>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜