adds post_id search to comments

This commit is contained in:
Toks
2013-04-02 20:34:41 -04:00
parent d0eb9dd78b
commit 3d7ebd0108

View File

@@ -49,6 +49,10 @@ class Comment < ActiveRecord::Base
q = q.body_matches(params[:body_matches])
end
if params[:post_id].present?
q = q.where("post_id = ?", params[:post_id].to_i)
end
if params[:post_tags_match].present?
q = q.post_tags_match(params[:post_tags_match])
end