0
这是工作的罚款Rails的图像LINK_TO不工作
<%= link_to "up.png", voteup_path(post_id: post.id, topic_id: post.topic_id), class: "xta" %>
但不是这个
<%= link_to image_tag("up.png"), voteup_path(post_id: post.id, topic_id: post.topic_id), class: "xta" %>
请告诉我如何我可以做它的工作。
尝试这种'<(%)=的link_to(IMAGE_TAG( “up.png”),voteup_path(POST_ID:post.id,topic_id:post.topic_id ),class:“xta”)%>' – Sontya
@Sontya感谢它的工作:)。请回答,以便我可以标记它正确 – Adt
很高兴它为你工作,添加为答案 – Sontya