Merge remote-tracking branch 'upstream/pull/5622'
This commit is contained in:
commit
22f590c9ef
4 changed files with 22 additions and 4 deletions
|
@ -266,7 +266,9 @@ module Api
|
|||
end
|
||||
|
||||
# Add any text filter
|
||||
@notes = @notes.joins(:comments).where("to_tsvector('english', note_comments.body) @@ plainto_tsquery('english', ?)", params[:q]) if params[:q]
|
||||
if params[:q]
|
||||
@notes = @notes.joins(:comments).where("to_tsvector('english', note_comments.body) @@ plainto_tsquery('english', ?) OR to_tsvector('english', notes.description) @@ plainto_tsquery('english', ?)", params[:q], params[:q])
|
||||
end
|
||||
|
||||
# Add any date filter
|
||||
if params[:from]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue