Include updater_name in /comments/1.json.

This commit is contained in:
evazion
2016-12-26 18:24:06 -06:00
parent c165b38a91
commit 69c50290a8
2 changed files with 5 additions and 3 deletions

View File

@@ -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

View File

@@ -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