fixes to model searches
This commit is contained in:
@@ -34,19 +34,19 @@ class Note < ActiveRecord::Base
|
||||
q = scoped
|
||||
return q if params.blank?
|
||||
|
||||
if params[:body_matches]
|
||||
if params[:body_matches].present?
|
||||
q = q.body_matches(params[:body_matches])
|
||||
end
|
||||
|
||||
if params[:post_tags_match]
|
||||
if params[:post_tags_match].present?
|
||||
q = q.post_tags_match(params[:post_tags_match])
|
||||
end
|
||||
|
||||
if params[:creator_name]
|
||||
if params[:creator_name].present?
|
||||
q = q.creator_name(params[:creator_name])
|
||||
end
|
||||
|
||||
if params[:creator_id]
|
||||
if params[:creator_id].present?
|
||||
q = q.where("creator_id = ?", params[:creator_id].to_i)
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user