开发者

Turn a link into an HTML entity with exact same functionality

开发者 https://www.devze.com 2023-02-17 19:44 出处:网络
I have this link: <%= link_to \"+1\", video_votes_path( :video_id => video.id, :type => \"up\" ), :method => :post, :remote => true %>

I have this link:

<%= link_to "+1", video_votes_path( :video_id => video.id, :type => "up" ), :method => :post, :remote => true %>
开发者_JAVA技巧

but I want to turn its visual appearance to this: ⇑ with the HTML entity &uArr;. How can I do this while keeping the link's functionality?


<%= link_to "&uArr;".html_safe, video_votes_path( :video_id => video.id, :type => "up" ), :method => :post, :remote => true %>
0

精彩评论

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

关注公众号