Change the application so that clicking a book’s image will also invoke
the yet to be written add_to_cart action
请问怎么用link_to实现?
敏捷开发书中的问题
- 写回答
- 好问题 0 提建议
- 追加酬金
- 关注问题
- 邀请回答
-
1条回答 默认 最新
- RubyOmniBus 2009-01-23 11:40关注
在xxx.html.erb之下
<%= link_to image_tag(Your_image_file_path), Your_add_to_cart_action -%>本回答被题主选为最佳回答 , 对您是否有帮助呢?解决 无用评论 打赏 举报