This commit is contained in:
Toks
2014-07-06 12:00:08 -04:00
parent 95d7b3bce5
commit 772003a55a
8 changed files with 11 additions and 19 deletions

View File

@@ -1,7 +1,7 @@
class CommentsController < ApplicationController
respond_to :html, :xml, :json
before_filter :member_only, :only => [:update, :create, :edit, :destroy]
rescue_from ActiveRecord::StatementInvalid, :with => :search_error
rescue_from ActiveRecord::StatementInvalid, :with => :rescue_exception
def index
if params[:group_by] == "comment"
@@ -103,14 +103,4 @@ private
raise User::PrivilegeError
end
end
protected
def search_error(e)
if e.message =~ /syntax error in tsquery/
@error_message = "Meta-tags are not supported in comment searches by tag"
render :template => "static/error", :status => 500
else
rescue_exception(e)
end
end
end