我正在尝试使 link_to 函数附加一个 css 类,
我的代码是这样的:
<%= link_to newGame do%>
<%= image_tag newGame.image_url.to_s %>
<% end %>
它将图像链接到其内容,但我需要在链接中添加一个 class="thumbnail",
IE:
<a href="/games/:id" class="thumbnaill>
而不是它当前产生的:
<a href="/games/:id">
谢谢