forum posts, comments: make timestamps into permalinks.
Make the timestamp beneath the username on forum posts into a permalink that links to the post in full context of the thread. For comments, make the timestamp link to the comment in full context of the post. * Make the timestamp in forum posts link to /forum_posts/123. * Make the timestamp in comments link to /posts/456#comment_123. * Make /forum_posts/123 redirect to /forum_topics/456#forum_post_123. * Make /comments/123 redirect to /posts/456#comment_123. * Remove the "ID: ###" and "Permalink" fields from forum posts.
This commit is contained in:
@@ -50,7 +50,12 @@ class CommentsController < ApplicationController
|
||||
|
||||
def show
|
||||
@comment = Comment.find(params[:id])
|
||||
respond_with(@comment)
|
||||
|
||||
respond_with(@comment) do |format|
|
||||
format.html do
|
||||
redirect_to post_path(@comment.post, anchor: "comment_#{@comment.id}")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def destroy
|
||||
|
||||
Reference in New Issue
Block a user