summaryrefslogtreecommitdiff
path: root/app/controllers/comments_controller.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/comments_controller.rb')
-rw-r--r--app/controllers/comments_controller.rb8
1 files changed, 7 insertions, 1 deletions
diff --git a/app/controllers/comments_controller.rb b/app/controllers/comments_controller.rb
index 3c2f57d..78821e5 100644
--- a/app/controllers/comments_controller.rb
+++ b/app/controllers/comments_controller.rb
@@ -2,6 +2,12 @@ class CommentsController < ApplicationController
include MailerHelper
+ def show
+ respond_to do |format|
+ format.json {render json: @comment.attributes.to_json}
+ end
+ end
+
def edit
@comment = Comment.find(params[:id])
if mod? || @comment.author.is?(current_user)
@@ -72,4 +78,4 @@ class CommentsController < ApplicationController
def comment_params
params.require(:comment).permit(:content)
end
-end \ No newline at end of file
+end