Merge pull request #2803 from evazion/fix-comment-cleanups

Various minor comment code cleanups
This commit is contained in:
Albert Yi
2016-12-27 11:42:08 -08:00
committed by GitHub
7 changed files with 14 additions and 28 deletions

View File

@@ -1,6 +1,6 @@
class CommentsController < ApplicationController
respond_to :html, :xml, :json
before_filter :member_only, :only => [:update, :create, :edit, :destroy]
before_filter :member_only, :except => [:index, :search, :show]
rescue_from ActiveRecord::StatementInvalid, :with => :rescue_exception
def index
@@ -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