Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
这段代码运行良好,但我确信 rails 有更好的方法来实现相同的结果。
<%= link_to (image_tag post.image1(:thumb)), (posts_path+"/"+(post.id).to_s) %>
这也应该有效:
<%= link_to (image_tag post.image1(:thumb)), post %>