【发布时间】:2011-02-12 22:26:11
【问题描述】:
想象一个包含posts 和comments 的博客。单个评论的 URL 可能是 posts/741/comments/1220。
但是,我想将 URL 设为 posts/741#1220,甚至是 posts/741#comment-1230。
这样做最不干扰的方式是什么,以便redirect_to comment_path(my_comment) 指向正确的 URL?
【问题讨论】:
标签: ruby-on-rails ruby-on-rails-3 routing anchor