Skip to content

Commit

Permalink
That kinda half worked
Browse files Browse the repository at this point in the history
  • Loading branch information
ArtOfCode- committed May 25, 2020
1 parent 16cca58 commit 5bb376e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/controllers/search_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def index
end
# Otherwise, it's REGEX or NOT REGEX, which fulltext won't do - fall back on search_string and params
search_string << "IFNULL(`posts`.`body`, '') #{body_operation} :body"
search_params[:body] = body
search_params[:body] = body.present? ? body : '%%'
end

@results = @results.where(search_string.join(' AND '), **search_params)
Expand Down

0 comments on commit 5bb376e

Please sign in to comment.