/comments.json: add id param; allow id and post_id to take lists of ids.
This commit is contained in:
@@ -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?
|
||||
|
||||
Reference in New Issue
Block a user