diff --git a/app/models/comment.rb b/app/models/comment.rb index 2f909b3b0..7e3d466c5 100644 --- a/app/models/comment.rb +++ b/app/models/comment.rb @@ -69,8 +69,12 @@ class Comment < ActiveRecord::Base q = q.body_matches(params[:body_matches]) end + if params[:id].present? + q = q.where("id in (?)", params[:id].split(",").map(&:to_i)) + end + if params[:post_id].present? - q = q.where("post_id = ?", params[:post_id].to_i) + q = q.where("post_id in (?)", params[:post_id].split(",").map(&:to_i)) end if params[:post_tags_match].present?