diff --git a/app/controllers/comments_controller.rb b/app/controllers/comments_controller.rb index 49ef61524..ff38ab0f6 100644 --- a/app/controllers/comments_controller.rb +++ b/app/controllers/comments_controller.rb @@ -48,9 +48,7 @@ class CommentsController < ApplicationController def show @comment = Comment.find(params[:id]) - respond_with(@comment) do |format| - format.json {render :json => @comment.to_json(:methods => [:creator_name])} - end + respond_with(@comment) end def destroy diff --git a/app/models/comment.rb b/app/models/comment.rb index 7b1583209..2f909b3b0 100644 --- a/app/models/comment.rb +++ b/app/models/comment.rb @@ -199,6 +199,10 @@ class Comment < ActiveRecord::Base super + [:body_index] end + def method_attributes + super + [:creator_name, :updater_name] + end + def delete! update_attributes(:is_deleted => true) end