标签: ruby-on-rails ruby image ruby-on-rails-3 hyperlink
这是图片:
<%= image_tag comment.user.profile.photo.url(:tiny) %>
这是链接路径:
comment.user.profile
现在我该如何将这两者结合起来?
答案 0 :(得分:8)
<%= link_to image_tag(comment.user.profile.photo.url(:tiny)), comment.user.profile %>