fixes #2133
This commit is contained in:
@@ -9,13 +9,14 @@ class CommentVote < ActiveRecord::Base
|
||||
validate :validate_user_can_vote
|
||||
validate :validate_comment_can_be_down_voted
|
||||
validates_inclusion_of :score, :in => [-1, 1], :message => "must be 1 or -1"
|
||||
attr_accessible :comment_id, :user_id, :score
|
||||
|
||||
def self.prune!
|
||||
destroy_all("created_at < ?", 14.days.ago)
|
||||
end
|
||||
|
||||
def self.search(params)
|
||||
q = scoped
|
||||
q = where("true")
|
||||
return q if params.blank?
|
||||
|
||||
if params[:comment_id]
|
||||
|
||||
Reference in New Issue
Block a user